Commit Graph

32 Commits

Author SHA1 Message Date
Frederik Gladhorn
f0fbff4c90 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
2013-12-24 00:56:59 +01:00
Oswald Buddenhagen
dd9444523d make qmake auto-rebuild after path reconfiguration
while the dependencies in the manual projects are crappy anyway, it is
still worth to cover the case of the user changing the install paths.

Change-Id: I0a7ca5c8ba660c689d6d7af6b65d878390d6456f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-12-22 22:42:37 +01:00
Thiago Macieira
b0afad8f0b Implement support for ref-qualified QString::toLatin1 & friends
This is the first step in implementing an in-place conversion of QString
to QByteArray. This requires ref-qualifiers in member functions so we
know that we have an rvalue QString.

Converting from UTF-16 to Latin1 always requires half the memory.

For conversion from UTF-16 to UTF-8, the typical string will also need
the same memory or less: characters from U+0000 to U+007F consume one
fewer byte; characters from U+0080 to U+07FF and from U+10000 to
U+1FFFFF occupy the same space in UTF-8 and UTF-16; it's only the ones
from U+0800 to U+FFFF that consume more space in the UTF-8 string.

For the locale's 8-bit codec, we can't be sure and the code (currently)
needs to go through QTextCodec anyway.

This requires a #define set before #include'ing "qstring.h". However,
since qstring.h is included by the QtCore PCH, we need an extra qmake
compiler without the PCH flags to compile this .cpp.

After this change, the distribution of calls in QtCore, Network, Gui,
and Widgets is as follows:

                  const &               &&
 toUtf8           31 (74%)              11 (26%)
 toLatin1         79 (77%)              24 (23%)
 toLocal8Bit      26 (16%)              138 (84%)

Change-Id: Idd96f9ddb51b989bc59f6da50054dd10c953dd4f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-13 09:29:58 +01:00
Morten Johan Sørvig
89ef515177 Add JSON parsing support to qmake.
Add qjson* implementation files from corelib/json
to the qmake build. Add a read-only compile mode,
enabled by defining QT_JSON_READONLY.

Add qmake built-in function parseJson(file, into)
which parses a json file into the given variable.

qmake uses a flat key -> value-list implementation
for storing variables, which means that some hackery
is need to represent arbitrarily nested JSON. Use a
special "_KEYS_" variable for arrays and objects:

Arrays:
["item1", "item2"]
$${array._KEYS_} -> 0 1 2
$${array.0} -> "item1"
$${array.1} -> "item2"

Objects:
{ "key1" : "value1", "key2" : "value2" }
$${object._KEYS_} -> key1 key2
$${object.key1} -> value1
$${object.key2} -> value2

Change-Id: I0aa2e4e4ae14fa25be8242bc16d3cffce32504d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-10-17 08:07:25 +02:00
Frederik Gladhorn
c8ca300e49 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/src.pro

Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
2013-08-21 11:03:18 +02:00
Thiago Macieira
d5ed6936be Don't compile MD4, MD5, SHA-2 and SHA-3 into qmake
We just need one digest algorithm, any algorithm, to generate a
somewhat unique identifier. SHA-1 will suffice.

Change-Id: I3cb26bf866d616df3ef32feace10934f19daa1a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-15 01:30:54 +02:00
Oswald Buddenhagen
b215176da3 implement simple VFS to support caching during project parsing
sync up with qt creator - for qmake itself, this is just a minor
refactoring.

Change-Id: I833253f81c3159056fab2ff888f293b36cc2ef56
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/66802ef8bf7989dc025e34bf91d93576189c483c)
(cherry picked from qtcreator/69542826fa643a0fed2fc9e717f072c2852dc017)
(cherry picked from qtcreator/196424115338fb9a535810704b7d814d318b0462)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-07 13:58:41 +02:00
Frederik Gladhorn
9b102e953f Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-06-13 10:05:49 +02:00
Oswald Buddenhagen
da8504b2ac add missing ifdefery
sync up implementation with qtcreator.

Change-Id: I6a1578818512fa3b0773faf276a1d56881eb06d7
(cherry picked from qttools/582cbddc6ba1b74a7e4e07e0b5c23d47de6838cb)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 16:27:10 +02:00
Oswald Buddenhagen
0a1b89bff5 run syncqt only for builds from git
the logic in the configures was even trying to express that, only that
nowadays we always ship syncqt, so the tests were kinda pointless.

this frees us from the perl dependency for non-developer builds of
packaged modules (except for webkit, which needs almost every scripting
language on earth anyway).

obviously, this requires that the packaging scripts run syncqt in the
source dir before tarring up the sources. note that for repositories
other than qtbase, the -version argument needs to be passed to syncqt.

Task-number: QTBUG-29465
Change-Id: Ic929ab17a5de4b30fbf48b3aa9bfa3b4d2ef37d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:47 +02:00
Oswald Buddenhagen
bd7ca33889 qfilesystemengine_mac.cpp is empty => purge
Change-Id: I61c615343f45fe52adee36b6822322bda2b2ca4f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-14 19:49:38 +01:00
Ray Donnelly
1a0924dfc0 Unify win32-g++ and Unix qmake Makefiles.
Replace the old sed / template @FOO@ method with echo.
Enable MSYS bash to build qmake.exe
Use qmake/Makefile.unix for all win32-g++ builds.

Change-Id: I6e27d69b28d27131838bbbb3a4ee5a08b470f31b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-19 10:35:06 +01:00
Oswald Buddenhagen
0e78e50802 port qmake to qt creator's qmake language evaluator
this is a monster commit which does the following things:
- import the evaluator as-is from qt creator into qmake/library/
  - integrate it into qmake's makefiles
  - overwrite proitems.h with actual special types
- remove the parts of Option which are redundant with QMakeGlobals
- make QMakeProperty a singleton owned by Option::globals. the dynamic
  handling so far made no sense.
- make QMakeProject a subclass of QMakeEvaluator, with relatively few
  extensions

the changes to existing qmake code outside project.* and option.* are
minor. implementing the changes gradually would mean changing a lot of
code which will be just replaced in the next commit, so i'm not wasting
my time on it.

Change-Id: I9746650423b8c5b3fbd8c3979a73228982a46195
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-11 00:13:01 +02:00
Oswald Buddenhagen
df175f190d introduce qmake variable abstractions
this is preparation for adapting to a new evaluator.

Change-Id: I6fc59f5525735754a00afa6629fbfe257e84db97
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-07 15:39:31 +02:00
Oswald Buddenhagen
001d4763b5 remove pretenses of manual dependencies
now that "make depend" actually works again, just clean out the gunk.

Change-Id: Ia1858a2474c9a4544ae16c53349aa7ae09e0c685
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:36:16 +02:00
Oswald Buddenhagen
07a6b2968e unbreak "make depend" for shadow builds
Change-Id: Ib79ba79e41cfeac9350852395b03c331dc4fe2a3
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:36:12 +02:00
Oswald Buddenhagen
279c4de35a unify c*flags in the hand-written makefiles somewhat
Change-Id: I7a7139fd71bce879b3ee4d9e26e30d2ca63da69e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:36:06 +02:00
Andy Shaw
44a7330d67 Remove references to Borland and bmake
Remove references to an old compiler that has not been
supported for a long time.  Also remove Borland specific
configuration flags which have no meaning elsewhere.

Change-Id: I3634a52b78f737ea972073e14c2b6669dcd0ae63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 12:39:39 +02:00
Bjoern Breitmeyer
00f9ac93c2 Fixed Wince Makefile environment
Integrated the checksdk tool into qmake and made
the makefiles selfcontained, so configure make, is now
enough to build qt for wince

Change-Id: I29076702eca2ec23d4d06bb3d5c5cef9d4f95161
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:09 +02:00
Thiago Macieira
7ae76153cb Remove -DQT_NO_STL from the bootstrapped builds
Change-Id: I37ea06426b66e617a49ec46952abdaad8814eadf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-07 05:19:56 +02:00
Jędrzej Nowacki
fb650b0271 Compile QArrayData in bootstrap phase.
This change will be needed during migration from QByteArrayData to
QArrayData.

Change-Id: I0c8d6f9ed3ef7c33af62736af55259a8f9a70c0f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-29 11:28:41 +02:00
Thiago Macieira
6ab6b0fc1c Disable QUrl support in QVariant in bootstrapped mode
The only use of QUrl in qmake, moc, uic and rcc is due to QVariant's
internals, so let's disable it. This means those binaries are now
probably a lot smaller since the parsing and IDNA code don't need to
be present.

Change-Id: Ie156b0817d119b2ba5d3dcb9712a9fea2ee7d4a1
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-24 16:30:58 +01:00
Olivier Goffart
3abc6be685 Build qmake with QStringBuilder.
QStringBuilder will be enabled by default so qmake should build with it.

qstringbuiler.cpp has to be compiled in just for the convertFromAscii
(The alternative was to build with QT_NO_CAST_FROM_ASCII, but that would
be too much work)

Change-Id: I1fbeed7ed8a9d3bc38ef591a687c50644980e2fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-16 23:02:15 +01:00
Lars Knoll
d5098f2802 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp

Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
2012-03-12 21:03:49 +01:00
Oswald Buddenhagen
46e51ce1dd do not copy/symlink qmake to build dir
make is perfectly capable of doing shadow builds

Change-Id: I7e1c27cddc385b7a17ae5645b9cd26fa56d2f029
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-09 14:23:15 +01:00
David Faure
dc75c20397 Split up base class QFileDevice for open-file operations (read/write)
This will be used later on as a base class for QTemporaryFile and
QSaveFile.

Change-Id: Ic2e1d232f95dc29b8e2f75e24a881ab459d3f037
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-06 12:09:57 +01:00
Oswald Buddenhagen
054051d91f remove some bogus include locations
nothing to be found in <sourcedir>/include.
neither in <builddir>/src/corelib/xml.

Change-Id: I381391a64542dc2ac7b421b6646c60a1b7a14639
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:22:00 +01:00
Kai Koehne
be98fa32c7 Allow customization of qDebug output at runtime
Check the QT_OUTPUT_PATTERN environment variable in the default
message handler to customize the output of messages. Following
place holders are right now supported:
 %{message}, %{type}, %{file}, %{line}, %{function}

The original cleanupFuncinfo was written by Thiago Macieira.

Change-Id: I6ad25baaa0e6a1c9f886105d2a93ef3310e512a9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure <faure@kde.org>
2012-02-09 18:11:21 +01:00
Giuseppe D'Angelo
c580be804f Remove unused -DQT_NO_PCRE from qmake makefiles
That define is not used anymore when building qmake.

Change-Id: I6a478cf4bb6cc8dfe87a3cc96f1d520b08e4ba6f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-23 21:24:25 +01:00
Joerg Bornemann
981dd3b314 qmake: remove symbian support
Change-Id: I1db834500921681676a6f46e7750bdd81bf0093d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-07 13:26:41 +01:00
Marius Storm-Olsen
1287361f64 Move private headers into versioned subdirectory
This will allow us to expose private headers in a controlled manner,
and ensure that they are not used by accident. This also means that
we internally will have to enable the private headers for the
modules we wish to use in the project.
2011-05-02 15:30:08 +02:00
Qt by Nokia
38be0d1383 Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://qt.gitorious.org/qt/pages/GitIntroductionWithQt

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
2011-04-27 12:05:43 +02:00