From da831007288bf65953d62eb1c049670988d1e098 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 4 Jan 2016 16:03:00 +0100 Subject: [PATCH] + fix major flaw in Spreadsheet module: do not include precompiled header in other header files + fix linking errors in drawing module --- src/Mod/Drawing/App/PreCompiled.h | 12 +++++++----- src/Mod/Drawing/Gui/PreCompiled.h | 2 ++ src/Mod/Spreadsheet/App/PreCompiled.h | 2 -- src/Mod/Spreadsheet/App/Utils.h | 1 - src/Mod/Spreadsheet/Gui/PreCompiled.h | 2 +- src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp | 8 +++++--- src/Mod/Spreadsheet/Gui/PropertiesDialog.h | 1 - src/Mod/Spreadsheet/Gui/SheetTableView.h | 1 - 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Mod/Drawing/App/PreCompiled.h b/src/Mod/Drawing/App/PreCompiled.h index abeafb3aa4..d7485df85e 100644 --- a/src/Mod/Drawing/App/PreCompiled.h +++ b/src/Mod/Drawing/App/PreCompiled.h @@ -28,13 +28,15 @@ // Exporting of App classes #ifdef FC_OS_WIN32 -# define DrawingExport __declspec(dllexport) -# define PartExport __declspec(dllimport) -# define MeshExport __declspec(dllimport) +# define DrawingExport __declspec(dllexport) +# define PartExport __declspec(dllimport) +# define MeshExport __declspec(dllimport) +# define SpreadsheetExport __declspec(dllimport) #else // for Linux # define DrawingExport -# define PartExport -# define MeshExport +# define PartExport +# define MeshExport +# define SpreadsheetExport #endif #ifdef _PreComp_ diff --git a/src/Mod/Drawing/Gui/PreCompiled.h b/src/Mod/Drawing/Gui/PreCompiled.h index 2d4d0ffbe1..7f7c534eed 100644 --- a/src/Mod/Drawing/Gui/PreCompiled.h +++ b/src/Mod/Drawing/Gui/PreCompiled.h @@ -32,10 +32,12 @@ # define DrawingExport __declspec(dllimport) # define PartExport __declspec(dllimport) # define DrawingGuiExport __declspec(dllexport) +# define SpreadsheetExport __declspec(dllimport) #else // for Linux # define DrawingExport # define PartExport # define DrawingGuiExport +# define SpreadsheetExport #endif #ifdef _MSC_VER diff --git a/src/Mod/Spreadsheet/App/PreCompiled.h b/src/Mod/Spreadsheet/App/PreCompiled.h index bfc8f37a6d..54f1355d51 100644 --- a/src/Mod/Spreadsheet/App/PreCompiled.h +++ b/src/Mod/Spreadsheet/App/PreCompiled.h @@ -30,10 +30,8 @@ // Importing of App classes #ifdef FC_OS_WIN32 # define SpreadsheetExport __declspec(dllexport) -# define SpreadsheetGuiExport __declspec(dllexport) #else // for Linux # define SpreadsheetExport -# define SpreadsheetGuiExport #endif diff --git a/src/Mod/Spreadsheet/App/Utils.h b/src/Mod/Spreadsheet/App/Utils.h index ec411865a4..0080397c8b 100644 --- a/src/Mod/Spreadsheet/App/Utils.h +++ b/src/Mod/Spreadsheet/App/Utils.h @@ -28,7 +28,6 @@ #include #include #include -#include "PreCompiled.h" namespace Spreadsheet { diff --git a/src/Mod/Spreadsheet/Gui/PreCompiled.h b/src/Mod/Spreadsheet/Gui/PreCompiled.h index 6377412114..0abb83b767 100644 --- a/src/Mod/Spreadsheet/Gui/PreCompiled.h +++ b/src/Mod/Spreadsheet/Gui/PreCompiled.h @@ -29,7 +29,7 @@ // Importing of App classes #ifdef FC_OS_WIN32 -# define SpreadsheetExport __declspec(dllimport) +# define SpreadsheetExport __declspec(dllimport) # define SpreadsheetGuiExport __declspec(dllexport) #else // for Linux # define SpreadsheetExport diff --git a/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp b/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp index 36bbfeb7ee..4cb67c8869 100644 --- a/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp +++ b/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp @@ -20,6 +20,8 @@ * * ***************************************************************************/ + +#include "PreCompiled.h" #include "PropertiesDialog.h" #include #include @@ -175,7 +177,7 @@ void PropertiesDialog::styleChanged() void PropertiesDialog::displayUnitChanged(const QString & text) { - if (text == "") { + if (text.isEmpty()) { displayUnit = DisplayUnit(); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); return; @@ -202,7 +204,7 @@ void PropertiesDialog::aliasChanged(const QString & text) { QPalette palette = ui->alias->palette(); - if (text.indexOf(QRegExp("^[A-Za-z][_A-Za-z0-9]*$")) >= 0) { + if (text.indexOf(QRegExp(QString::fromLatin1("^[A-Za-z][_A-Za-z0-9]*$"))) >= 0) { try { CellAddress address(text.toUtf8().constData()); @@ -217,7 +219,7 @@ void PropertiesDialog::aliasChanged(const QString & text) } } else { - if (text == "") { + if (text.isEmpty()) { aliasOk = true; palette.setColor(QPalette::Text, Qt::black); } diff --git a/src/Mod/Spreadsheet/Gui/PropertiesDialog.h b/src/Mod/Spreadsheet/Gui/PropertiesDialog.h index 528dcc9e98..411e452231 100644 --- a/src/Mod/Spreadsheet/Gui/PropertiesDialog.h +++ b/src/Mod/Spreadsheet/Gui/PropertiesDialog.h @@ -24,7 +24,6 @@ #define PROPERTIESDIALOG_H #include -#include "PreCompiled.h" #include namespace Ui { diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.h b/src/Mod/Spreadsheet/Gui/SheetTableView.h index aa6986878c..0eb54f5509 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.h +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.h @@ -27,7 +27,6 @@ #include #include #include -#include "PreCompiled.h" #include #include