OSDN Git Service

get rid of internal QT_SCRIPT_LIB and QT_UITOOLS_LIB definitions
authorIvailo Monev <xakepa10@gmail.com>
Thu, 31 Dec 2020 17:08:04 +0000 (19:08 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Thu, 31 Dec 2020 17:08:04 +0000 (19:08 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
CMakeLists.txt
src/core/CMakeLists.txt
src/designer/CMakeLists.txt
src/designer/shared/scriptdialog.cpp
src/uitools/CMakeLists.txt

index 9514bb7..921ecd0 100644 (file)
@@ -326,17 +326,6 @@ set_package_properties(ExecInfo PROPERTIES
     TYPE RECOMMENDED
 )
 
-add_definitions(
-    # these conditionals are probably going to become default in the future
-    -DQT_POSIX_IPC
-    # -DQT_STRICT_ITERATORS
-    # -DQT_ASCII_CAST_WARNINGS
-    # maybe one day, this forces it onto other projects which (most likely)
-    # means source code adjustments!
-    # -DQT_NO_CAST_FROM_ASCII
-    # -DQT_NO_CAST_TO_ASCII
-)
-
 # for symbols mangling while backtracing in core component
 check_include_file_cxx(cxxabi.h HAVE_CXXABI)
 
index d68a529..9a0a98a 100644 (file)
@@ -1,4 +1,7 @@
-# add_definitions()
+add_definitions(
+    # that conditional is probably going to become default in the future
+    -DQT_POSIX_IPC
+)
 set(EXTRA_CORE_LIBS
     ${ZLIB_LIBRARIES}
     ${ICU_LIBRARIES}
index f1ea35b..cab7ca9 100644 (file)
@@ -1,5 +1,4 @@
 add_definitions(
-    -DQT_SCRIPT_LIB -DQT_UITOOLS_LIB
     -DKATIE_TOOLS_SUFFIX="${KATIE_TOOLS_SUFFIX}"
 )
 set(EXTRA_DESIGNER_LIBS
index 6ec4d75..1b10269 100644 (file)
@@ -41,9 +41,7 @@
 #include <QtGui/QHBoxLayout>
 #include <QtGui/QDialogButtonBox>
 #include <QtGui/QMessageBox>
-#ifdef QT_SCRIPT_LIB
 #include <QtScript/QScriptEngine>
-#endif
 
 QT_BEGIN_NAMESPACE
 
@@ -106,19 +104,15 @@ variables <i>widget</i> and <i>childWidgets</i>, respectively.");
         const QString script = trimmedScript();
         if (script.isEmpty())
             return true;
-#ifdef QT_SCRIPT_LIB
         QScriptEngine scriptEngine;
         if (scriptEngine.canEvaluate(script))
             return true;
         m_dialogGui->message(this, QDesignerDialogGuiInterface::ScriptDialogMessage, QMessageBox::Warning,
                              windowTitle(), tr("Syntax error"), QMessageBox::Ok);
         return  false;
-#else
-        Q_UNUSED(m_dialogGui);
-        return true;
-#endif
     }
 } // namespace qdesigner_internal
 
 QT_END_NAMESPACE
+
 #include "moc_scriptdialog_p.h"
index 97ae6cf..f9fa451 100644 (file)
@@ -1,4 +1,4 @@
-add_definitions(-DQT_UITOOLS_LIB)
+# add_definitions()
 set(EXTRA_UITOOLS_LIBS KtCore KtGui KtXml KtScript)
 
 set(UITOOLS_PUBLIC_HEADERS