Minor Qt build issues

27 views
Skip to first unread message

dail8859

unread,
Jun 13, 2017, 9:28:34 AM6/13/17
to scintilla-interest

I was messing around with using Scintilla with Qt and came across a few minor issues. I'm very new to Qt so hopefully I'm not too off track. I apologize for not being able to make real patches right now but the changes are minor.

First, at line 30 of qt/ScintillaEditBase/ScintillaEditBase.h should be

#ifndef EXPORT_IMPORT_API
#ifdef WIN32
#ifdef MAKING_LIBRARY
#define EXPORT_IMPORT_API __declspec(dllexport)
#else
// Defining dllimport upsets moc
#define EXPORT_IMPORT_API __declspec(dllimport)
//#define EXPORT_IMPORT_API
#endif
#else
#define EXPORT_IMPORT_API
#endif
#endif

This simply adds the top ifndef and bottom endif. This is exactly how qt/ScintillaEdit/ScintillaDocument.h and qt/ScintillaEdit/ScintillaEdit.h file does checking for dll(import|export)


Secondly, the qt project files (ScintillaEditBase.pro, ScintillaEdit.pro, and ScintillaEditPy.pro) specify some SOURCE files using wildcards such as "../../lexers/*.cxx". This does not seem to cause a problem until you try to include one of these pro files in a parent project like this:

TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = Scintilla/qt/ScintillaEditBase/ScintillaEditBase.pro myapp/myapp.pro
myapp.depends = ScintillaEditBase

 Relevant stack overflow discussion https://stackoverflow.com/a/41121739 states that the wildcards can be specified like this "$$files(../../lexers/*.cxx, false)" though this does say qmake v3.0 is required.

Using: Win7, Qmake v3.1, Qt 5.9.0, Qt Creator 4.3.0

Thanks,
Justin

Neil Hodgson

unread,
Jun 13, 2017, 6:58:38 PM6/13/17
to scintilla...@googlegroups.com
Justin:

> First, at line 30 of qt/ScintillaEditBase/ScintillaEditBase.h should be
>
> #ifndef EXPORT_IMPORT_API
> …
> #endif
>
> This simply adds the top ifndef and bottom endif. This is exactly how qt/ScintillaEdit/ScintillaDocument.h and qt/ScintillaEdit/ScintillaEdit.h file does checking for dll(import|export)

OK.
https://sourceforge.net/p/scintilla/code/ci/29c42c61f7c45a742ee126e4498a8ce30be2a132/

> Secondly, the qt project files (ScintillaEditBase.pro, ScintillaEdit.pro, and ScintillaEditPy.pro) specify some SOURCE files using wildcards such as "../../lexers/*.cxx”.
> …
> Relevant stack overflow discussion https://stackoverflow.com/a/41121739 states that the wildcards can be specified like this "$$files(../../lexers/*.cxx, false)" though this does say qmake v3.0 is required.

Its unlikely that the qmake 3 dependency will be a problem. So committed as
https://sourceforge.net/p/scintilla/code/ci/9db390056b6606f3848bab871f55851e8770e15f/

Neil

Reply all
Reply to author
Forward
0 new messages