# HG changeset patch # User Santeri Piippo # Date 1386282584 -7200 # Node ID 0e38beeb050aac3b2d5ed8a3a674c01093ab9806 # Parent 0334789cb4d7d7f91552e345b75602efc7f88767 - Renamed common.h to main.h, split the PROPERTY macro and supporting macros to property.h diff -r 0334789cb4d7 -r 0e38beeb050a src/colorSelectDialog.cpp --- a/src/colorSelectDialog.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/colorSelectDialog.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -24,7 +24,7 @@ #include #include -#include "common.h" +#include "main.h" #include "gui.h" #include "colorSelectDialog.h" #include "colors.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/colorSelectDialog.h --- a/src/colorSelectDialog.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/colorSelectDialog.h Fri Dec 06 00:29:44 2013 +0200 @@ -20,7 +20,7 @@ #define LDFORGE_COLORSELECTOR_H #include -#include "common.h" +#include "main.h" class LDColor; class Ui_ColorSelUI; diff -r 0334789cb4d7 -r 0e38beeb050a src/colors.cpp --- a/src/colors.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/colors.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -21,7 +21,7 @@ * TODO: g_LDColors should probably be a map. */ -#include "common.h" +#include "main.h" #include "colors.h" #include "file.h" #include "misc.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/colors.h --- a/src/colors.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/colors.h Fri Dec 06 00:29:44 2013 +0200 @@ -20,7 +20,7 @@ #define LDFORGE_COLORS_H #include -#include "common.h" +#include "main.h" #define MAX_COLORS 512 diff -r 0334789cb4d7 -r 0e38beeb050a src/common.h --- a/src/common.h Thu Dec 05 23:42:39 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,203 +0,0 @@ -/* - * LDForge: LDraw parts authoring CAD - * Copyright (C) 2013 Santeri Piippo - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -// ============================================================================= -// This file is included one way or another in every source file of LDForge. -// Stuff defined and included here is universally included. - -#ifndef LDFORGE_COMMON_H -#define LDFORGE_COMMON_H - -// Hack to make KDevelop parse QString properly. Q_REQUIRED_RESULT expands into -// an __attribute__((warn_unused_result)) KDevelop's lexer doesn't seem to -// understand, yielding an error and leaving some methods unlexed. -// -// The following first includes to get Q_REQUIRED_RESULT defined first, -// then re-defining it as nothing. This causes Q_REQUIRED_RESULT to essentially -// "vanish" from QString's methods when KDevelop lexes them. -// -// Similar reasoning for Q_DECL_HIDDEN, except with Q_OBJECT this time. -#ifdef IN_IDE_PARSER -# include -# undef Q_REQUIRED_RESULT -# undef Q_DECL_HIDDEN -# define Q_REQUIRED_RESULT -# define Q_DECL_HIDDEN -#endif - -#include -#include -#include -#include -#include -#include - -#include "config.h" - -#define APPNAME "LDForge" -#define VERSION_MAJOR 0 -#define VERSION_MINOR 2 -#define VERSION_PATCH 999 -#define BUILD_ID BUILD_INTERNAL - -#define BUILD_INTERNAL 0 -#define BUILD_ALPHA 1 -#define BUILD_BETA 2 -#define BUILD_RC 3 -#define BUILD_RELEASE 4 - -// RC Number for BUILD_RC -#define RC_NUMBER 0 - -// ============================================= -#ifdef DEBUG -# undef RELEASE -#endif // DEBUG - -#ifdef RELEASE -# undef DEBUG -#endif // RELEASE - -// ============================================= -#define alias auto& -#define elif(A) else if (A) - -// Null pointer -static const std::nullptr_t null = nullptr; - -#ifdef WIN32 -# define DIRSLASH "\\" -# define DIRSLASH_CHAR '\\' -#else // WIN32 -# define DIRSLASH "/" -# define DIRSLASH_CHAR '/' -#endif // WIN32 - -#define PROPERTY( ACCESS, TYPE, NAME, OPS, WRITETYPE ) \ - private: \ - TYPE m_##NAME; \ - \ - public: \ - inline TYPE const& GET_READ_METHOD( NAME, OPS ) const \ - { return m_##NAME; \ - } \ - \ - ACCESS: \ - DEFINE_WRITE_METHOD_##WRITETYPE( TYPE, NAME ) \ - DEFINE_PROPERTY_##OPS( TYPE, NAME ) - -#define GET_READ_METHOD( NAME, OPS ) \ - GET_READ_METHOD_##OPS( NAME ) - -#define GET_READ_METHOD_BOOL_OPS( NAME ) is##NAME() -#define GET_READ_METHOD_NO_OPS( NAME ) get##NAME() -#define GET_READ_METHOD_STR_OPS( NAME ) get##NAME() -#define GET_READ_METHOD_NUM_OPS( NAME ) get##NAME() - -#define DEFINE_WRITE_METHOD_STOCK_WRITE( TYPE, NAME ) \ - inline void set##NAME( TYPE const& NAME##_ ) \ - { m_##NAME = NAME##_; \ - } - -#define DEFINE_WRITE_METHOD_CUSTOM_WRITE( TYPE, NAME ) \ - void set##NAME( TYPE const& NAME##_ ); \ - -#define DEFINE_WITH_CB( NAME ) void NAME##Changed(); -#define DEFINE_NO_CB( NAME ) - -#define DEFINE_PROPERTY_NO_OPS( TYPE, NAME ) - -#define DEFINE_PROPERTY_STR_OPS( TYPE, NAME ) \ - void append##NAME( TYPE a ) \ - { TYPE tmp( m_##NAME ); \ - tmp.append( a ); \ - set##NAME( tmp ); \ - } \ - \ - void prepend##NAME( TYPE a ) \ - { TYPE tmp( m_##NAME ); \ - tmp.prepend( a ); \ - set##NAME( tmp ); \ - } \ - \ - void replaceIn##NAME( TYPE a, TYPE b ) \ - { TYPE tmp( m_##NAME ); \ - tmp.replace( a, b ); \ - set##NAME( tmp ); \ - } - -#define DEFINE_PROPERTY_NUM_OPS( TYPE, NAME ) \ - inline void increase##NAME( TYPE a = 1 ) \ - { set##NAME( m_##NAME + a ); \ - } \ - \ - inline void decrease##NAME( TYPE a = 1 ) \ - { set##NAME( m_##NAME - a ); \ - } - -#define DEFINE_PROPERTY_BOOL_OPS( TYPE, NAME ) \ - inline void toggle##NAME() \ - { set##NAME( !m_##NAME ); \ - } - -#ifdef null -#undef null -#endif // null - -#ifdef __GNUC__ -#define FUNCNAME __PRETTY_FUNCTION__ -#else -#define FUNCNAME __func__ -#endif // __GNUC__ - -// Replace assert with a version that shows a GUI dialog if possible. -// On Windows I just can't get the actual error messages otherwise. -void assertionFailure (const char* file, int line, const char* funcname, const char* expr); - -#ifdef assert -# undef assert -#endif // assert - -#ifdef DEBUG -# define assert(N) { ((N) ? (void) 0 : assertionFailure (__FILE__, __LINE__, FUNCNAME, #N)); } -#else -# define assert(N) {} -#endif // DEBUG - -// Version string identifier -QString versionString(); -QString versionMoniker(); -QString fullVersionString(); - -// ----------------------------------------------------------------------------- -#ifdef IN_IDE_PARSER // KDevelop workarounds: -# error IN_IDE_PARSER is defined (this code is only for KDevelop workarounds) - -# ifndef va_start -# define va_start(va, arg) -# endif // va_start - -# ifndef va_end -# define va_end(va) -# endif // va_end - -static const char* __func__ = ""; // Current function name -typedef void FILE; // :| -#endif // IN_IDE_PARSER - -#endif // LDFORGE_COMMON_H diff -r 0334789cb4d7 -r 0e38beeb050a src/config.cpp --- a/src/config.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/config.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -26,7 +26,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "config.h" #include "misc.h" #include "gui.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/configDialog.cpp --- a/src/configDialog.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/configDialog.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -29,7 +29,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "configDialog.h" #include "file.h" #include "config.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/dialogs.h --- a/src/dialogs.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/dialogs.h Fri Dec 06 00:29:44 2013 +0200 @@ -20,7 +20,7 @@ #define LDFORGE_DIALOGS_H #include -#include "common.h" +#include "main.h" #include "types.h" class Ui_ExtProgPath; diff -r 0334789cb4d7 -r 0e38beeb050a src/docs.cpp --- a/src/docs.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/docs.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -20,7 +20,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "types.h" // ============================================================================= diff -r 0334789cb4d7 -r 0e38beeb050a src/download.h --- a/src/download.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/download.h Fri Dec 06 00:29:44 2013 +0200 @@ -20,7 +20,7 @@ #define LDFORGE_DOWNLOAD_H #include -#include "common.h" +#include "main.h" #include "types.h" class LDFile; diff -r 0334789cb4d7 -r 0e38beeb050a src/extprogs.cpp --- a/src/extprogs.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/extprogs.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -24,7 +24,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "config.h" #include "misc.h" #include "gui.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/file.cpp --- a/src/file.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/file.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -25,7 +25,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "config.h" #include "file.h" #include "misc.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/file.h --- a/src/file.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/file.h Fri Dec 06 00:29:44 2013 +0200 @@ -19,7 +19,7 @@ #ifndef LDFORGE_FILE_H #define LDFORGE_FILE_H -#include "common.h" +#include "main.h" #include "ldtypes.h" #include "history.h" #include diff -r 0334789cb4d7 -r 0e38beeb050a src/gldraw.cpp --- a/src/gldraw.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/gldraw.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -25,7 +25,7 @@ #include #include -#include "common.h" +#include "main.h" #include "config.h" #include "file.h" #include "gldraw.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/gldraw.h --- a/src/gldraw.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/gldraw.h Fri Dec 06 00:29:44 2013 +0200 @@ -20,7 +20,7 @@ #define LDFORGE_GLDRAW_H #include -#include "common.h" +#include "main.h" #include "ldtypes.h" class MessageManager; diff -r 0334789cb4d7 -r 0e38beeb050a src/gui.cpp --- a/src/gui.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/gui.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -35,7 +35,7 @@ #include #include -#include "common.h" +#include "main.h" #include "gldraw.h" #include "gui.h" #include "file.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/gui_editactions.cpp --- a/src/gui_editactions.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/gui_editactions.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -22,7 +22,7 @@ #include #include "gui.h" -#include "common.h" +#include "main.h" #include "file.h" #include "colorSelectDialog.h" #include "misc.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/history.h --- a/src/history.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/history.h Fri Dec 06 00:29:44 2013 +0200 @@ -19,7 +19,7 @@ #ifndef LDFORGE_HISTORY_H #define LDFORGE_HISTORY_H -#include "common.h" +#include "main.h" #include "ldtypes.h" #define IMPLEMENT_HISTORY_TYPE(N) \ diff -r 0334789cb4d7 -r 0e38beeb050a src/ldtypes.cpp --- a/src/ldtypes.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/ldtypes.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "common.h" +#include "main.h" #include "ldtypes.h" #include "file.h" #include "misc.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/ldtypes.h --- a/src/ldtypes.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/ldtypes.h Fri Dec 06 00:29:44 2013 +0200 @@ -19,7 +19,7 @@ #ifndef LDFORGE_LDTYPES_H #define LDFORGE_LDTYPES_H -#include "common.h" +#include "main.h" #include "types.h" #define LDOBJ(T) \ diff -r 0334789cb4d7 -r 0e38beeb050a src/main.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main.h Fri Dec 06 00:29:44 2013 +0200 @@ -0,0 +1,138 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 Santeri Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// ============================================================================= +// This file is included one way or another in every source file of LDForge. +// Stuff defined and included here is universally included. + +#ifndef LDFORGE_MAIN_H +#define LDFORGE_MAIN_H + +// Hack to make KDevelop parse QString properly. Q_REQUIRED_RESULT expands into +// an __attribute__((warn_unused_result)) KDevelop's lexer doesn't seem to +// understand, yielding an error and leaving some methods unlexed. +// +// The following first includes to get Q_REQUIRED_RESULT defined first, +// then re-defining it as nothing. This causes Q_REQUIRED_RESULT to essentially +// "vanish" from QString's methods when KDevelop lexes them. +// +// Similar reasoning for Q_DECL_HIDDEN, except with Q_OBJECT this time. +#ifdef IN_IDE_PARSER +# include +# undef Q_REQUIRED_RESULT +# undef Q_DECL_HIDDEN +# define Q_REQUIRED_RESULT +# define Q_DECL_HIDDEN +#endif + +#include +#include +#include +#include +#include +#include + +#include "property.h" +#include "config.h" + +#define APPNAME "LDForge" +#define UNIXNAME "ldforge" +#define VERSION_MAJOR 0 +#define VERSION_MINOR 2 +#define VERSION_PATCH 999 +#define BUILD_ID BUILD_INTERNAL + +#define BUILD_INTERNAL 0 +#define BUILD_ALPHA 1 +#define BUILD_BETA 2 +#define BUILD_RC 3 +#define BUILD_RELEASE 4 + +// RC Number for BUILD_RC +#define RC_NUMBER 0 + +// ============================================= +#ifdef DEBUG +# undef RELEASE +#endif // DEBUG + +#ifdef RELEASE +# undef DEBUG +#endif // RELEASE + +// ============================================= +#define alias auto& +#define elif(A) else if (A) + +// Null pointer +static const std::nullptr_t null = nullptr; + +#ifdef WIN32 +# define DIRSLASH "\\" +# define DIRSLASH_CHAR '\\' +#else // WIN32 +# define DIRSLASH "/" +# define DIRSLASH_CHAR '/' +#endif // WIN32 + +#ifdef null +#undef null +#endif // null + +#ifdef __GNUC__ +#define FUNCNAME __PRETTY_FUNCTION__ +#else +#define FUNCNAME __func__ +#endif // __GNUC__ + +// Replace assert with a version that shows a GUI dialog if possible. +// On Windows I just can't get the actual error messages otherwise. +void assertionFailure (const char* file, int line, const char* funcname, const char* expr); + +#ifdef assert +# undef assert +#endif // assert + +#ifdef DEBUG +# define assert(N) { ((N) ? (void) 0 : assertionFailure (__FILE__, __LINE__, FUNCNAME, #N)); } +#else +# define assert(N) {} +#endif // DEBUG + +// Version string identifier +QString versionString(); +QString versionMoniker(); +QString fullVersionString(); + +// ----------------------------------------------------------------------------- +#ifdef IN_IDE_PARSER // KDevelop workarounds: +# error IN_IDE_PARSER is defined (this code is only for KDevelop workarounds) + +# ifndef va_start +# define va_start(va, arg) +# endif // va_start + +# ifndef va_end +# define va_end(va) +# endif // va_end + +static const char* __func__ = ""; // Current function name +typedef void FILE; // :| +#endif // IN_IDE_PARSER + +#endif // LDFORGE_MAIN_H diff -r 0334789cb4d7 -r 0e38beeb050a src/messagelog.h --- a/src/messagelog.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/messagelog.h Fri Dec 06 00:29:44 2013 +0200 @@ -21,7 +21,7 @@ #include #include -#include "common.h" +#include "main.h" #include "types.h" class GLRenderer; diff -r 0334789cb4d7 -r 0e38beeb050a src/misc.cpp --- a/src/misc.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/misc.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -19,7 +19,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "misc.h" #include "gui.h" #include "dialogs.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/misc.h --- a/src/misc.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/misc.h Fri Dec 06 00:29:44 2013 +0200 @@ -21,7 +21,7 @@ #include #include "config.h" -#include "common.h" +#include "main.h" #include "types.h" #define NUM_PRIMES 500 diff -r 0334789cb4d7 -r 0e38beeb050a src/primitives.h --- a/src/primitives.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/primitives.h Fri Dec 06 00:29:44 2013 +0200 @@ -19,7 +19,7 @@ #ifndef LDFORGE_PRIMITIVES_H #define LDFORGE_PRIMITIVES_H -#include "common.h" +#include "main.h" #include "types.h" #include #include diff -r 0334789cb4d7 -r 0e38beeb050a src/property.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/property.h Fri Dec 06 00:29:44 2013 +0200 @@ -0,0 +1,89 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 Santeri Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef LDFORGE_PROPERTY_H +#define LDFORGE_PROPERTY_H + +#define PROPERTY( ACCESS, TYPE, NAME, OPS, WRITETYPE ) \ + private: \ + TYPE m_##NAME; \ + \ + public: \ + inline TYPE const& GET_READ_METHOD( NAME, OPS ) const \ + { return m_##NAME; \ + } \ + \ + ACCESS: \ + DEFINE_WRITE_METHOD_##WRITETYPE( TYPE, NAME ) \ + DEFINE_PROPERTY_##OPS( TYPE, NAME ) + +#define GET_READ_METHOD( NAME, OPS ) \ + GET_READ_METHOD_##OPS( NAME ) + +#define GET_READ_METHOD_BOOL_OPS( NAME ) is##NAME() +#define GET_READ_METHOD_NO_OPS( NAME ) get##NAME() +#define GET_READ_METHOD_STR_OPS( NAME ) get##NAME() +#define GET_READ_METHOD_NUM_OPS( NAME ) get##NAME() + +#define DEFINE_WRITE_METHOD_STOCK_WRITE( TYPE, NAME ) \ + inline void set##NAME( TYPE const& NAME##_ ) \ + { m_##NAME = NAME##_; \ + } + +#define DEFINE_WRITE_METHOD_CUSTOM_WRITE( TYPE, NAME ) \ + void set##NAME( TYPE const& NAME##_ ); \ + +#define DEFINE_WITH_CB( NAME ) void NAME##Changed(); +#define DEFINE_NO_CB( NAME ) + +#define DEFINE_PROPERTY_NO_OPS( TYPE, NAME ) + +#define DEFINE_PROPERTY_STR_OPS( TYPE, NAME ) \ + void append##NAME( TYPE a ) \ + { TYPE tmp( m_##NAME ); \ + tmp.append( a ); \ + set##NAME( tmp ); \ + } \ + \ + void prepend##NAME( TYPE a ) \ + { TYPE tmp( m_##NAME ); \ + tmp.prepend( a ); \ + set##NAME( tmp ); \ + } \ + \ + void replaceIn##NAME( TYPE a, TYPE b ) \ + { TYPE tmp( m_##NAME ); \ + tmp.replace( a, b ); \ + set##NAME( tmp ); \ + } + +#define DEFINE_PROPERTY_NUM_OPS( TYPE, NAME ) \ + inline void increase##NAME( TYPE a = 1 ) \ + { set##NAME( m_##NAME + a ); \ + } \ + \ + inline void decrease##NAME( TYPE a = 1 ) \ + { set##NAME( m_##NAME - a ); \ + } + +#define DEFINE_PROPERTY_BOOL_OPS( TYPE, NAME ) \ + inline void toggle##NAME() \ + { set##NAME( !m_##NAME ); \ + } + +#endif // LDFORGE_PROPERTY_H \ No newline at end of file diff -r 0334789cb4d7 -r 0e38beeb050a src/types.cpp --- a/src/types.cpp Thu Dec 05 23:42:39 2013 +0200 +++ b/src/types.cpp Fri Dec 06 00:29:44 2013 +0200 @@ -21,7 +21,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "types.h" #include "misc.h" #include "ldtypes.h" diff -r 0334789cb4d7 -r 0e38beeb050a src/types.h --- a/src/types.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/types.h Fri Dec 06 00:29:44 2013 +0200 @@ -23,7 +23,7 @@ #include #include #include -#include "common.h" +#include "main.h" class LDObject; diff -r 0334789cb4d7 -r 0e38beeb050a src/widgets.h --- a/src/widgets.h Thu Dec 05 23:42:39 2013 +0200 +++ b/src/widgets.h Fri Dec 06 00:29:44 2013 +0200 @@ -22,7 +22,7 @@ #include #include #include -#include "common.h" +#include "main.h" #include "types.h" class QIcon;