Header refactoring patches

Yuriy Skalko yuriy.skalko at gmail.com
Sun Oct 25 22:45:53 UTC 2020


>> --- a/src/frontends/Clipboard.h
>> +++ b/src/frontends/Clipboard.h
>> @@ -14,6 +14,7 @@
>>  #ifndef BASE_CLIPBOARD_H
>>  #define BASE_CLIPBOARD_H
>>  
>> +#include "support/FileName.h"
>>  #include "support/strfwd.h"
>>  
>>  namespace lyx {
>> diff --git a/src/frontends/qt/GuiKeySymbol.h b/src/frontends/qt/GuiKeySymbol.h
>> index e4a59b7f5e..a3293d7c2f 100644
>> --- a/src/frontends/qt/GuiKeySymbol.h
>> +++ b/src/frontends/qt/GuiKeySymbol.h
>> @@ -13,7 +13,8 @@
>>  #ifndef GUIKEYSYM_H
>>  #define GUIKEYSYM_H
>>  
>> -class QKeyEvent;
>> +#include "KeySymbol.h"
>> +#include <QKeyEvent>
>>  
>>  namespace lyx {
>>  
> 
> 
> 
> These two look strange, how did we compile before if these two are needed? P

As you can see `FileName` and `KeySymbol` types are used in text of 
Clipboard.h and GuiKeySymbol.h, so they should be defined (or declared). 
Previously it happened that these headers in all clients were included 
after some other headers that define these types (directly or indirectly).

Now headers with needed types are imported explicitly and hidden 
dependency become visible.


Yuriy



More information about the lyx-devel mailing list