Commit Graph

290 Commits

Author SHA1 Message Date
Oswald Buddenhagen
0eff800e81 add support for returning the command's exit status to $$system()
... and make use of it in qtRunLoggedCommand().

Change-Id: I242dfde344f555800cef1f55d3cb85418a93277f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:29 +00:00
Oswald Buddenhagen
22d1351dde print no message at all when no argument is supplied to error()
this is useful when an adequate message has already been emitted by
other means, like various built-ins do.

Change-Id: I092771f55969fad8b214204d666327664727c572
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-08 09:48:38 +00:00
Edward Welbourne
f6fc34294f Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
5.7 now supports clang on android; but dev re-worked configure

	src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line.  Applied the rename to both
for consistency.

	tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.

	.qmake.conf
Ignored 5.7's change to MODULE_VERSION.

	configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.

Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
2016-08-01 18:20:00 +02:00
Friedemann Kleint
a5c851598c moc: Add warnings when resolving and opening includes fails
Previously, only cryptic warnings:

QFSFileEngine::open: No file name specified

occurred.

Task-number: QTBUG-55014
Change-Id: Ic99614eb58c605ed6e1b86d3d4b8f527c5b9244c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-29 12:10:36 +00:00
Olivier Goffart
c5a4b093d0 Add QMetaEnum::isScoped to be able to destinguish C++11 enum class
Change-Id: I67b1dbd069fa57bd60e50690abb5d876edc0d1d2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-26 22:49:31 +00:00
Edward Welbourne
6c5de416c9 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/io/qtemporarydir.cpp
One side encapsulated a repeated piece of #if-ery in a local define;
the other added to the #if-ery.  Made its addition to the other's.

	src/corelib/kernel/qeventdispatcher_unix_p.h
One side moved some members into a struct; this collided with a #undef
check that neither side now has.  Discarded the #undef part.

	src/gui/opengl/qopengltexturehelper_p.h
5.7 deleted a bunch of methods; not clear why merge got confused.

	src/tools/moc/moc.cpp
One added a name to the copyright header; another changed its URL.

Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
2016-07-26 10:43:29 +02:00
Edward Welbourne
601019e3f4 Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-07-22 10:15:48 +00:00
Olivier Goffart
af055964f5 moc: fix infinite loop over malformed input
We should not call prev() if we had already reched the end.

Task-number: QTBUG-54815
Change-Id: I56bc86880a0dbfdce57fc4a08e5950f2ff3a5958
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-07-20 06:56:40 +00:00
Thiago Macieira
da04322b4c Make moc obey the preprocessor environment variable for include paths
C preprocessors augment their standard list of include paths from the
environment: Unix preprocessors use $C_INCLUDE_PATH (for C) and
$CPLUS_INCLUDE_PATH (for C++), plus CPATH for both, whereas MSVC uses
the an environment variable simply called "INCLUDE". Handling this for
MSVC is particularly important because the VCVARSALL.BAT script sets the
necessary #include paths in the environment for important things.
Without that being parsed, moc won't find some #defines, like
WINAPI_DESKTOP_FAMILY.

[ChangeLog][moc] qmake and moc now cooperate to use the Visual Studio
environment variables (set by the VCVARSALL.BAT script) to find system
include files. A possible consequence is that moc parses application
headers slightly differently, depending on #if conditions that depended
on macros that previous versions had not seen #define'd. Implementers of
other buildsystems are advised to pass the --compiler-flavor=msvc option
to moc.

Change-Id: I7e06274214d1939b0124e5b4bf169cceaef9ca46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-20 02:54:09 +00:00
Thiago Macieira
36d524e6a3 moc: get the system #defines from the compiler itself
In order for moc to properly parse #ifdefs and family, we've had
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
compiler. That list is woefully incomplete.

Instead, let's simply ask the compiler for the list. With GCC and
family, we use the -dM flag while preprocessing. With ICC on Windows,
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
requires using some undocumented switches and parsing environment
variables (I've tested MSVC 2012, 2013 and 2015).

The new moc option is called --include to be similar to GCC's -include
option. It does more than just parse a list of pre-defined macros and
can be used to insert any sort of code that moc needs to parse prior to
the main file.

Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-20 02:54:03 +00:00
Edward Welbourne
782ebeada1 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	qmake/library/qmakeevaluator.cpp
	qmake/library/qmakeevaluator.h
	qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
  changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
  changed the survivor

	src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.

	src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.

	src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.

	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
	src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.

	tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.

	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml
	tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.

There was no git-conflict in
	src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them.  Put FixedColumnMatrix<>::removeRow(int)
back for its new user.

Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
2016-07-19 20:14:40 +02:00
Edward Welbourne
82ea53ad24 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	qmake/library/qmakeevaluator.cpp

One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line.  Trivial resolution.

Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
2016-07-15 20:47:57 +02:00
Olivier Goffart
34de4f6a15 moc: Fix a crash with malformed input
Do not increment 'data' past the buffer in case of invalid token.

Remove the left over qDebug so we can make a test.

Task-number: QTBUG-54609
Change-Id: I8f0dd3381fbdea3f07d3c05c9a44a16d92538117
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-07-15 09:37:45 +00:00
Lars Knoll
c32ef0a725 Don't error out on preprocessor concatenation of two strings
"foo" ## "bar" doesn't make a lot of sense, but MSVC allows them
(although gcc errors out on them). Simply ignore the ## in this case
instead of aborting with an error.

Fixes parsing of the Windows winsock2.h header.

Task-number: QTBUG-54560
Change-Id: I84cd5fbb56a006cf379430708c955cf0da475cff
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-13 19:50:48 +00:00
Oswald Buddenhagen
3c8134958c fix raw data leak in $$absolute_path()
when the file name is empty, the path will be returned verbatim. this
must be considered when constructing the return value.

Task-number: QTBUG-54550
Change-Id: Ie108ed52275e66a154ef63bd6f7193f55b3e0454
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-13 14:27:01 +00:00
Oswald Buddenhagen
d459a6b0e0 fix calculations of worst-case size requirements for token buffer
Change-Id: I3aa4c736acec44f95a0a33c7baae9276568f684f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 14:26:58 +00:00
Oswald Buddenhagen
dacf3994ba fix custom functions inheriting other functions' arguments
Task-number: QTBUG-41830
Change-Id: Iba3eee4975a1ee671b7190e52c0efc9a18147c62
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 14:26:54 +00:00
Oswald Buddenhagen
1b4ea11332 make error() propagate from requires() and REQUIRES=
that can make sense if a function which determines the availability of
a dependency fails to do so for unexpected reasons.

Change-Id: If6cd113df25aee66830c120a2fab067c822a4543
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-13 14:26:49 +00:00
Oswald Buddenhagen
339b9706cc make error() propagate from custom replace functions
it didn't, which is rather unexpected.

Change-Id: I8cdb7b1490a8c2207809812b93cc65fbe23a1b98
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-13 14:26:46 +00:00
Oswald Buddenhagen
b27d4835c2 fix error() not propagating through if()
if() would simply "downgrade" a fatal error to a false condition, which
is certainly not expected.

Change-Id: Ie9c54f2bddf588856498bf795007b341b7c9363a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-13 14:26:42 +00:00
Lars Knoll
34c24ceb1f Improve error reporting when parsing JSON files
At least report the error string and the file offset where
the error happened.

Change-Id: Iaa1733593b8af2a7a52b67c0f495731f045d2c11
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-17 16:11:11 +00:00
Liang Qi
511790fd1a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	mkspecs/features/uikit/sdk.prf
	src/corelib/global/qhooks.cpp
	src/corelib/io/qfilesystemwatcher.cpp
	src/corelib/io/qlockfile_unix.cpp
	src/corelib/tools/qalgorithms.h
	src/gui/kernel/qwindowsysteminterface.h
	src/gui/text/qtextdocument_p.cpp
	src/network/access/access.pri
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/src.pro
	src/testlib/qtestcase.cpp
	src/widgets/kernel/qwidgetbackingstore_p.h
	src/widgets/styles/qwindowscestyle.cpp
	src/widgets/styles/qwindowsmobilestyle.cpp
	tests/auto/corelib/io/qdiriterator/qdiriterator.pro
	tests/auto/corelib/io/qfileinfo/qfileinfo.pro
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
2016-06-13 12:46:46 +02:00
Thiago Macieira
2cf099e9f6 tst_Moc: restore signals/slots/emit to the Q_UPPERCASE values
The previous definition of signals does not need to be "public". It may
have been something else.

Change-Id: Id69569111e7d4e619e22ffff144b4855e6acdbef
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-05-30 14:02:19 +00:00
Oswald Buddenhagen
50e22c7653 add $$sorted() function.
[ChangeLog][qmake] Added $$sorted() function.

Change-Id: Ic069d3ef7c0b7a260c714c76eecc71c41417d01f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-05-25 06:19:16 +00:00
Oswald Buddenhagen
e70330f99e add $$str_member() function
just like $$member(), but operates on a string value rather than a list
variable. it is the swiss army knife of cutting, providing equivalents
of left(), right(), mid() and reverse() all in one.

[ChangeLog][qmake] Added $$str_member() function.

Change-Id: I7c7c6c971db402fff41b428d32a4451f45400728
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-25 06:19:11 +00:00
Oswald Buddenhagen
22f3800cac add $$str_size() function
this is strlen(), but the name is matched to $$size(), just namespaced
to reflect that it operates on a string value rather than a list
variable.

[ChangeLog][qmake] Added $$str_size() function.

Change-Id: I56c8b863da244e66bd283257a66b197aa73b0e57
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-25 06:19:00 +00:00
Oswald Buddenhagen
d3cc25ef52 add $$num_add() (numeric addition) function
amazing how we managed to do without it for so long. ^^

the name is intentionally somewhat obscure to avoid clashes, and some
namespacing is good anyway.

[ChangeLog][qmake] Added $$num_add() function.

Change-Id: Ib7648b1f425ef096a87b51f158d0f1409e5c4daa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-25 06:18:55 +00:00
Oswald Buddenhagen
3d21634fb6 add $$take_first() and $$take_last() functions
while implementing stacks and queues was possible before with the help
of $$member(), these functions make it much more straight-forward.

[ChangeLog][qmake] Added $$take_first() and $$take_last() functions.

Change-Id: I4922a5331780e468a42c663c9ad3c6456a95a6bf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-25 06:18:50 +00:00
Oswald Buddenhagen
ad17a35853 make QMakeParser take a QStringRef as input
the only place where this actually saves a deep copy is the evaluation
of if(), but as a side effect the parser is now able to deal with not
null-terminated strings, which is kinda nice as well.

Change-Id: Ib6d08617aa79d2f9eaecd4906d4d548f34bf377d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-24 12:38:59 +00:00
Liang Qi
56d6e000f7 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/corelib/global/qnamespace.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qfsfileengine_win.cpp
	src/corelib/tools/tools.pri
	src/network/ssl/qsslconfiguration_p.h
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/plugins/platforms/windows/windows.pri
	src/src.pro
	src/tools/bootstrap/bootstrap.pro
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/dialogs/qfilesystemmodel.cpp
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt

Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
2016-05-23 21:09:46 +02:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Olivier Goffart
27425e62c0 Moc: fix crash when a file ends with \\\r
make the 'cleaned' more robust by making sure we do not read past the
buffer in some cases. We must also use resize and not reserve on the
outpt buffer because reseve is meant as a hint and we are not supposed
to write past the size of the QByteArray even if it is reserved.

[ChangeLog][moc] Fixed crash on file ending with \\\r

Task-number: QTBUG-53441
Change-Id: I901e6c0ffc7f8877de3d07fd08cf26495461d294
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-18 10:34:13 +00:00
Thiago Macieira
6fb56a74c8 tst_moc: Remove invalid preprocessor usage
Doing what this code section was doing is not valid use of the
preprocessor. Therefore, we don't have to have this behavior and are
allowed to change how moc parses this.

Change-Id: Id69569111e7d4e619e22ffff144b45ea91ae22e3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-05-04 16:44:30 +00:00
Liang Qi
6357813207 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	src/3rdparty/double-conversion/include/double-conversion/utils.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/tools/qsimd_p.h
	tests/auto/corelib/io/qfile/tst_qfile.cpp

Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
2016-05-03 15:49:15 +02:00
Oswald Buddenhagen
b3fcaea5f2 make extra compiler targets depend on their respective compiler
Change-Id: I6c04e0188137f6bbfeab243f00860b8ff079f69a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-18 09:38:10 +00:00
Lars Knoll
da95152dfb Unify naming of LIBS/CFLAGS for 3rd party libraries
Most libs use QMAKE_LIBS/CFLAGS, but some have other naming
conventions. Unify them into using QMAKE_LIBS/CFLAGS.

Change-Id: I39b188adc1f9a223a83b294c5315c3095a9c68de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-07 16:18:03 +00:00
Liang Qi
216f57ef86 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
2016-04-04 08:59:18 +02:00
Joerg Bornemann
479ee4fa46 moc: bail out early on missing or invalid options file
If moc is invoked with the @ argument and no options file is specified
or the options file cannot be read, do not try to parse the empty
arguments list. Otherwise QCommandLineParser will print an additional
error message that is of no value for the user.

Task-number: QTBUG-51847
Change-Id: I9aa1eb20a44097b553123be8bc6fded87473a03a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-31 08:57:39 +00:00
Liang Qi
50d0f57b77 Merge remote-tracking branch 'origin/5.6' into 5.7
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
2016-03-11 20:08:50 +01:00
Marc Mutz
2020d2cb63 QObject: fix GCC 6 warning about qt_static_metacall's 'hidden' attribute use
This warning is triggered when we try to apply the Q_DECL_HIDDEN
attribute to a class in an unnamed namespace. Such classes are
already not exported.

  qobjectdefs.h:175:108: warning: ‘visibility’ attribute ignored [-Wattributes]
  qobjectdefs.h:198:108: warning: ‘visibility’ attribute ignored [-Wattributes]

Added a test on gadgets (and QObjects) in unnamed namespaces,
because qtbase currently does not contain such Q_GADGETs.

Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ic747cc2ab45e4dc6bb70ffff1438c747b05c5672
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-09 20:11:28 +00:00
Jarek Kobus
cb24903ef4 Generate QVariant::fromValue(enum_value) for enum values
Instead of just QVariant(enum_value).

Task-number: QTBUG-49383
Change-Id: Id57c65b68d4328816046bc35301dc6afba47b727
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-09 13:51:39 +00:00
Pavel Geiger
eedf16c96f uic: Accept an -idbased argument
When we want to use qtTrId function instead QApplication::translate in
generated files it's not possible to use custom function with presented by
the --tr argument due to signature difference between qtTrId and
QApplication::translate function.

With this argument present, uic will generate qtTrId function with second
argument empty. When used together with --tr parameter it will use
presented function instead.

Change-Id: I0d986e4ea25ce58917fd9a2866b1eac0a4671502
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2016-01-28 14:07:43 +00:00
Thiago Macieira
23bd4651c7 Update the Intel copyright year
Not that we require it, but since The Qt Company did it for all files
they have copyright, even if they haven't touched the file in years
(especially not in 2016), I'm doing the same.

Change-Id: I7a9e11d7b64a4cc78e24ffff142b4c9d53039846
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 22:44:16 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Jani Heikkinen
18455d5585 Fixed qtbase tests to pass with updated license header
Change-Id: I996a1c3713d0799504bd98ffcdfdc7841c88182a
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
2016-01-21 18:55:03 +00:00
Thiago Macieira
7ffcafd1b5 Remove all the atomic code besides MSVC and std::atomic
[ChangeLog][Important Behavior Changes] Starting with Qt 5.7, Qt
requires a C++11 compiler with support for C++11 atomics. This affects
user code too: Qt headers no longer compile with a C++98 compiler. The
minimum compiler versions for this release are:
 * Clang 3.4 (found in XCode 5.1)
 * GCC 4.7
 * Microsoft Visual Studio 2012

Change-Id: Ib056b47dde3341ef9a52ffff13ef1f496ea9363f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2016-01-19 23:41:52 +00:00
Frederik Gladhorn
ad16478a76 Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi

Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
2016-01-08 12:35:24 +01:00
Oswald Buddenhagen
e5f3b653f0 add enablers for printing project errors in cumulative mode
this doesn't actually do anything in qmake.

Change-Id: Ia14953a5a9dc31af56ad6c338017dd5b85bb4494
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/08d0cb6f8e90a818bf6d3bec7a6d00f16419b8c0)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-21 16:39:31 +00:00
Oswald Buddenhagen
57ca8d2698 make write_file() capable of making files (not) executable
Change-Id: I9ca96bc3408160261781697a3471c1f446c86c3a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-21 16:34:26 +00:00
Liang Qi
beb65dcd79 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/gui/painting/painting.pri
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
	tests/auto/corelib/tools/qlocale/test/test.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
	tools/configure/environment.cpp

Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
2015-12-18 08:37:31 +01:00