Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build without SCRIPT_INTERFACE on Qt 5.7 #4565

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@mirabilos
Copy link
Contributor

mirabilos commented Jan 11, 2019

  • without SCRIPT_INTERFACE, Qt 5.7 is enough
  • cursor.cpp depends on FractionWrapper
  • backwards-compatible QString + QStringRef construction
  • let Q_NAMESPACE and Q_ENUM_NS depend on SCRIPT_INTERFACE
  • Ms::Direction must be Q_DECLARE_METATYPE
  • elide plugin-related headers from the build without SCRIPT_INTERFACE
  • supply matching ifdefs for pluginManager calls in main code

This is based on changes by @AntonioBL and I merely made it rely on the SCRIPT_INTERFACE compilation option more (so it does not break anything when SCRIPT_INTERFACE is on — that is, by default), to make backporting this easier.

Add header defining DBL_MIN and DBL_MAX, too.

Tested to compile fine on Debian stable (9 “stretch”), Qt 5.7.

@Jojo-Schmitz

This comment has been minimized.

Copy link
Contributor

Jojo-Schmitz commented Jan 11, 2019

That may make it work for Windows XP too

@mirabilos

This comment has been minimized.

Copy link
Contributor Author

mirabilos commented Jan 11, 2019

Yes, but you may need to edit the CXXFLAGS in the CMakeLists for that, see ABL’s original patch.

@mirabilos mirabilos force-pushed the mirabilos:fix-build-without-plugins branch from 30aafec to e52a698 Jan 11, 2019

@mirabilos

This comment has been minimized.

Copy link
Contributor Author

mirabilos commented Jan 11, 2019

Hmm, I missed something in ifdeffing. It now fails with Qt 5.11 on Debian unstable. Will hack until fixed… eh, actually, no idea why this would fail. Anyone got one?

Hm, got a hunch, but maybe that isn’t it. There may be the MOC involved. We’ll see…

@mirabilos mirabilos force-pushed the mirabilos:fix-build-without-plugins branch from e52a698 to dc3d26f Jan 11, 2019

@mirabilos

This comment has been minimized.

Copy link
Contributor Author

mirabilos commented Jan 11, 2019

This should do it. Tested on both stretch / Qt 5.7.1 and sid / Qt 5.11.3.

@@ -33,7 +33,7 @@ include_directories(
)

if (SCRIPT_INTERFACE)
set (SCRIPT_FILES mscorePlugins pluginCreator.cpp qmledit.cpp pluginManager.cpp)
set (SCRIPT_FILES mscorePlugins pluginCreator.cpp pluginCreator.h pluginManager.cpp pluginManager.h qmledit.cpp qmledit.h)

This comment has been minimized.

@AntonioBL

AntonioBL Jan 11, 2019

Contributor

I am wondering if these header files should be put here or not. Maybe it's their presence here which was causing the compilation error. Just a wild guess...

@AntonioBL

This comment has been minimized.

Copy link
Contributor

AntonioBL commented Jan 11, 2019

And by the way, thank you for translating my messy patch into a proper PR. 😄

@mirabilos

This comment has been minimized.

Copy link
Contributor Author

mirabilos commented Jan 11, 2019

@mirabilos

This comment has been minimized.

Copy link
Contributor Author

mirabilos commented Jan 11, 2019

@Jojo-Schmitz

This comment has been minimized.

Copy link
Contributor

Jojo-Schmitz commented Jan 13, 2019

Travis fails seems to be due to some networking issue, unrelated to the PR, and after all tests passed

@mirabilos mirabilos force-pushed the mirabilos:fix-build-without-plugins branch from dc3d26f to 5422b44 Jan 15, 2019

@mirabilos

This comment has been minimized.

Copy link
Contributor Author

mirabilos commented Jan 15, 2019

Rebased on git master as of today (3.0.1 release equivalent), please apply now.

@mirabilos mirabilos changed the base branch from 3.0 to master Jan 15, 2019

Fix build without SCRIPT_INTERFACE on Qt 5.7
 * without SCRIPT_INTERFACE, Qt 5.7 is enough
 * cursor.cpp depends on FractionWrapper
 * backwards-compatible QString + QStringRef construction
 * let Q_NAMESPACE and Q_ENUM_NS depend on SCRIPT_INTERFACE
 * Ms::Direction must be Q_DECLARE_METATYPE
 * elide plugin-related headers from the build without SCRIPT_INTERFACE
 * supply matching ifdefs for pluginManager calls in main code

This is based on changes by ABL <antonio.lotti@alice.it>
and I merely made it rely on the SCRIPT_INTERFACE compilation
option more (so it does not break anything when SCRIPT_INTERFACE
is on — that is, by default), to make backporting this easier.

Add header defining DBL_MIN and DBL_MAX, and add multiple
inclusion guards around "config.h" as it’s included in many
places.

@mirabilos mirabilos force-pushed the mirabilos:fix-build-without-plugins branch from 5422b44 to 3ecff36 Jan 15, 2019

@anatoly-os

This comment has been minimized.

Copy link
Contributor

anatoly-os commented Jan 25, 2019

Was a part of #4610. Thank you @mirabilos.

@anatoly-os anatoly-os closed this Jan 25, 2019

@mirabilos mirabilos deleted the mirabilos:fix-build-without-plugins branch Jan 25, 2019

@mirabilos

This comment has been minimized.

Copy link
Contributor Author

mirabilos commented Jan 25, 2019

Thanks for merging, @dmitrio95 and @anatoly-os !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.