Commit Graph

7853 Commits

Author SHA1 Message Date
Oswald Buddenhagen
812adb58ba dispose of library-bound feature files
specifically, qtestlib.prf, qdbus.prf, help.prf, designer.prf and
quitools.prf - they have been obsoleted by modularization.
add noisy backwards compat hack to qt.prf.

Change-Id: I26f84fdd51798265471e20dd1f40efec59b1087e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:52 +02:00
Oswald Buddenhagen
8b3499c577 -qconfig needs no own switch case any more
Change-Id: I56c14cb7a2bf9e6641c48574d2b13436c1b7f714
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:51 +02:00
Oswald Buddenhagen
7de9d37099 remove the insane switch case for qt-style yes options
it only serves to create merge conflicts. the treatment is the same as
for "unclassified" options anyway (they ignore the value, so it can be
"yes" just as well).

Change-Id: I9a75769338b4dc1f58493f1a1f1dd2c2e895290a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:51 +02:00
Oswald Buddenhagen
b2954378d6 don't overquote make command
$(MAKE) is apparently already quoted when the path contains spaces

Change-Id: Ie09a0f43083f9eae95fc135c3a74364eaa356934
2012-06-19 16:39:51 +02:00
Oswald Buddenhagen
78290e66c4 clean up path normalization in configure.exe and QLibraryInfo
always use normalized path separators, except when running native
commands or printing (note however that the qmake -query output will now
be consistently normalized).

Change-Id: I6ae920c3bc656cb517d1f4e4e5518cf79e002169
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:50 +02:00
Oswald Buddenhagen
17b6125bce rewrite SUBDIRS construction logic
clearer and gets the conditional dependencies right

Change-Id: Ifb24a4a84caffb0e3b45af7eb8cb21f5c5861d54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:50 +02:00
Oswald Buddenhagen
c7bf0448da detach src/src.pro and src/tools/tools.pro from qtbase.pro
they were included instead of being proper subdirs. this doesn't appear
to be necessary for anything at this point.

Change-Id: Ie57285df8e5ea7bd8883bcd42fa6ed62b8e1d54d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:21 +02:00
Oswald Buddenhagen
bcadd2ded2 remove convoluted recursive debug/release target magic
this has been a) dysfunct and b) unnecessary for *quite* a while.

Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Change-Id: I5d658a15d0c1dc923002f8d773eecb8382cd213d
2012-06-19 16:37:50 +02:00
Oswald Buddenhagen
709cc8800e make makefile generation under unix sane
we now simply call qmake -r, which is also what we do under windows.
-fast mode is retained for examples and tests, though with moderately
modified semantics (i couldn't be bothered to decipher what the old ones
were supposed to be).

Change-Id: Id2c2d2bed9c8d52ac42f31b388bffc34f4649650
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:50 +02:00
Oswald Buddenhagen
7d8578418d properly declare the host tools as such in the project files
don't mess with the qmake cmdline args any more.

Change-Id: I399d87145d31d25e29951b6acd96387a3c7282f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:50 +02:00
Oswald Buddenhagen
14bbab09c1 introduce ability to build projects for the host system
when qmake runs into the new option(host_build) command, it will restart
the project evaluation with a host spec.

the new default host spec is called default-host (gasp!). it is
overridden with the pre-exising -spec / -platform option, while the new
-xspec / -xplatform option overrides the pre-existing default spec.
specifying -spec but not -xspec will set the xspec, too, so the behavior
is backwards-compatible. same for the XQMAKESPEC override read from
.qmake.cache and the environment variable.
the cleaner solution would be adding -hostspec, to be symmetrical with
the override semantics, but that would deviate from configure in turn.

Change-Id: I4297c873780af16ab7928421b434ce0f1d3820da
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:49 +02:00
Oswald Buddenhagen
528192a78b Revert "make default_pro.prf advertize dynamically created .qmake.cache"
... and followup fixes.
this is not needed any more due to the breaking patch being reverted.

Change-Id: Ia3416fcc16ddece680efbd0322286a601879fa0a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:49 +02:00
Oswald Buddenhagen
4e9cbfc90f Revert "move .qmake.cache search to Option"
We are now moving in the exact opposite direction.
This logically reverts commit 059200a44b.
Some adjustments were necessary to maintain the project root stuff.

Conflicts:

	qmake/main.cpp
	qmake/option.cpp
	qmake/option.h
	qmake/project.cpp

Change-Id: Ic14fa571cbbfe9ac159f92493e49741d70a87eff
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:49 +02:00
Oswald Buddenhagen
d8b2998dae Revert "move finding the makespec to Option"
Needed for an upcoming revert.
This reverts commit 74a6669fa7.

Conflicts:

	qmake/option.cpp
	qmake/project.cpp
	qmake/property.cpp

Change-Id: I56088506d27bf1f095f9261c75224f4bee17ec60
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:49 +02:00
Janne Anttila
a0cf2119a7 Disable TranslucentBackground for WinCE to fix Windows QPA plugin build.
WinCE and WEC7 does not support layered Windows APIs:
http://msdn.microsoft.com/en-us/library/hh300132.aspx

For now - fallback to default window BitBlt always in WinCE.

Change-Id: I6f99d198dec9e90fb4a968882271b466638009d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 09:14:31 +02:00
Bradley T. Hughes
28f193ab53 QEvent: Don't give DeferredDelete special treatment
After commit 9b07fd0d5c, Qt no longer
keeps the loop-level in QEvent's d-pointer. This means we no longer need
to special case this event type in the QEvent copy constructor,
assignment operator, and destructor.

Change-Id: Iff71713d38303674f4517fdfa169cc448ed41dd4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-19 02:55:50 +02:00
Bradley T. Hughes
ccf988e510 clang: Do not use libstdc++ when C++11 is enabled
We expect that the C++ library also supports C++11 when the compiler
says it does as well. When using clang with libstdc++, the library has
no C++11 support or headers, so we cannot use, for example, #include
<initializer_lists>.

Change-Id: I844877107256f15ab314e8f82fe54434dbb07638
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-19 00:39:28 +02:00
Johannes Zellner
60f2abff5e raspberry: remove unused screen size detection code
The fbdev fallback code now resides in the default implemenatation of
the hooks.

Change-Id: Id3d2cd23ab826b90c0e6d442bfb222aa8c291646
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-19 00:38:27 +02:00
Johannes Zellner
e7836e6a9a platform hooks: provide defaults for screen size and depth hooks
Default hooks for querying screen size and color depth based on linux
fbdev API.

Change-Id: I7fc75c0df5e0f507cf679439416fe68c8f62f91d
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-19 00:38:02 +02:00
Samuel Rødal
95427b0f40 Fixed QOpenGLFunctions API.
We don't use the GL short term in the new API.

Change-Id: I73a51f65f5f4216c1763b95dcddf68fe8fc229d1
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-18 21:58:30 +02:00
Samuel Rødal
7967cb4f48 Prevent ending up in a state where focus is perpetually grabbed.
Mouse / enter / leave / key events etc are all blocked when a window has
the blockedByModalWindow flag set. The problem appears if a QWindow is
created and only later directly or indirectly parented to a modal window
that's currently showing. Since the decision on whether a window should
be blocked or not is based on its parent / transient parent chain, we
need to reevaluate the blocked status each time the parent or transient
parent of a window changes.

Task-number: QTBUG-26112
Change-Id: Ida6b118b556fe26d17fa86335a0fe7baddc7eaf8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-18 21:58:30 +02:00
Girish Ramakrishnan
3c8eb40487 xcb: ensure the primary screen is added first
Currently, Qt windows without an explicit screen parameter always appear
on screen 0 despite the DISPLAY being set to :0.1. With this change,
the xcb backend adds the primary display at the beginning of the
screen list. QGuiApplication::primaryScreen() will then return that
display for all windows without an explicit screen.

Change-Id: I657c4ed92b9e0f0ed379e91c732dad9d69c4f5e0
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-18 21:58:30 +02:00
Jeremy Katz
abe4b31713 Make QUuid compile with QT_NO_QUUID_STRING
Task-number: QTBUG-24816

Change-Id: I0cbb0581a1c3abefdde75b7cd45fdafd31640f0d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-06-18 19:15:54 +02:00
Miikka Heikkinen
486601fbc4 Clean up a partially scrolled QRollEffect widget
If the associated widget pointer got zeroed while QRollEffect was
scrolling, the partially scrolled QRollEffect widget remained on
screen indefinitely as 'done' was never set to true.

Change-Id: If1567ea740e81b5501137d10db471ca97d295ed8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-18 16:11:39 +02:00
Thiago Macieira
ba7f664a7f Fix tst_qfile opening of stdin/out/err: don't assume
The standard streams can be redirected to a file, so don't assume
anything, but try to get the actual size and position from the OS and
from the C library (stdout is usually buffered, so the result of lseek
might be different from ftell).

Change-Id: Ice4a0aa21726671928f56a13cc07cc0e4b52091d
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-18 13:45:28 +02:00
Janne Anttila
9fe5139e73 Fix building of qtbase examples when printsupport module is disabled.
Printsupport module is not that interesting in embedded environments,
and it also does not compile at the moment for WEC7. Fixed qtbase
examples to obey the availability of printsupport module.

Change-Id: I960d1b628b9ca82450aa3b0df8dd101b2544ee12
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-18 09:48:55 +02:00
Konstantin Ritt
15db02cb11 tst_QChar: drop outdated testcase
Change-Id: I0c06643165b299c552c697f400608e29ae4e7f7a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-16 21:15:08 +02:00
Konstantin Ritt
fa705caca7 Improve the code generation by using Q_LIKELY/Q_UNLIKELY
+ reorder conditions in getWordBreaks() to make further updates more clear

Change-Id: I1ca9adde066c3a48830f310202f7181585fac194
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-16 21:14:48 +02:00
Konstantin Ritt
ff1aba7d92 Make QTBF autotest support SMP code points in the test data
I didn't do this earlier since the current test data doesn't contain any SMP code points,
the Unicode 6.2 test data does - so, I can confirm this code really works.

Change-Id: Ieae35e8480a89e22d846fd038e79592fefbbf2ee
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-16 21:14:35 +02:00
Berthold Krevert
3a77bbe68b Fix: Widgets that become top-level widgets may crash the application
You can reproduce the bug with the QMainWindow demo application: Just
dock the toolbar on the left side, then try to drag the bar back to
the top and observe that the application crashes.

This happens, because the toolbar becomes a top-level widget during the
dragging action and therefore some data structures like a window are
created. After the toolbar has been docked, it loses its top-level state
and the window object is destroyed. The same is not true for the backing
store structure, which still keeps a pointer to the destroyed window.
When the toolbar is dragged the next time, a new window object is created,
but the backing store tries to access the deleted one. Crash occurs.

Change-Id: I0d1ffc04c19ec14654ceb62a0d3cf7cf65cb952d
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-15 19:36:35 +02:00
Stephen Kelly
e83c3a0d33 Add automatic metatype declaration for QPointer and QWeakPointer.
Change-Id: Ic9a04fa68d0bb14ef07455a6559e59f4b887f38b
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-15 19:33:41 +02:00
Jonathan Liu
aca3513dda Do not redefine NIN_KEYSELECT if already defined
NIN_KEYSELECT is already defined for MinGW-w64.

Change-Id: Ieab9f883cf1680f792d085e254916d51602ce701
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-15 16:13:01 +02:00
Jonas M. Gastal
007476ab19 Fix double error setting, which overrode correct value.
Change-Id: I3bc992b8b41f305a01b80bca16346e18ac4d7833
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-15 14:06:49 +02:00
Thiago Macieira
b719bd498e Forward-declare QLatin1String too
qhash.h doesn't include qstring.h and was depending on an indirect
inclusion (probably via qpair.h -> qdatastream.h -> qiodevice.h ->
qobject.h -> qstring.h, which I've broken).

Since it forward-declares QString and QStringRef, let's add
QLatin1String too.

Change-Id: I179ebb22f761b88423ef13643afa2e5ce91ef6a2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-15 00:55:53 +02:00
Johannes Zellner
11aa64b1a1 eglfs: Pass QSurfaceFormat to createNativeWindow() hook
Change-Id: Ib352d8591360a224359ef218b95cd27cdfaf81aa
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-14 16:12:31 +02:00
Girish Ramakrishnan
f2d04d9b8c eglfs: Make QEglFSWindow respect the window format
Prior to this change, eglfs code used to override the window format
with it's own format. With this change, eglfs will respect the window
format. This is useful when the application requires a surface with
alpha (for example, so that the video layer below is visible)

QEglFSHooks::surfaceFormatFor() allows the hook author to override
the context and window surface format.

Change-Id: I97f03a8b0871dfebfca73004fa0188b33d0d0367
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-14 16:12:19 +02:00
ABBAPOH
ed776e3670 Speedup for QAbstractItemViewPrivate::delegateForIndex
This fix prevents copying of a QPointer on a stack and adding/removing
QMetaObject guards

Change-Id: I844c10cede1536a14ad7cd9f007470966619d6d6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-14 16:00:05 +02:00
Thiago Macieira
606c21526a Use QPointer, not QWeakPointer.
QWeakPointer tracking of QObjects is deprecated.

Change-Id: I1a81a0f9bbe02a6a38a50ab4a50e7c65212fa591
Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com>
Reviewed-by: Michael Hasselmann <michaelh@openismus.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-06-14 15:29:07 +02:00
David Faure
741b1fcfa3 Make qurlinfo private, now that QFtp is private.
Change-Id: I0bb641b397b7087c89009f92d9973e0922dce653
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-14 12:23:11 +02:00
Jeremy Katz
cd89b164a5 Extend JSON QStandardPaths to support multiple paths per location
Allow a location to be specified as an array of paths.
    LOCATION: ["first", "second"]

The first value is selected for writableLocation().

Define the first entry as an empty string for no writable path.
    LOCATION: ["", "second"]

A single path may be expressed as a string.
    LOCATION: "only"

Change-Id: I897cf40a039ad7cb680bdf643bfa78020e8eb1cb
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-06-14 12:20:51 +02:00
Jani Honkonen
a85d15259c Fix QListView::scrollTo() when there are hidden rows
This is a cherry-pick of b0601630dd0ddabfaa3b97d042ee02b981d95988
from February

QListView does not consider hidden rows when scrolling to an item.
If there are hidden rows (or columns) before the selected item then
the visual index of an item is not the same as the row index
from the model. So scrolling will be off by the number of hidden
rows before the selected item.

Added a autotest for this also.

Task-number: QTBUG-21115
Change-Id: I01b097bce7f163cdb480a71b763c060cc006fdc7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-14 10:11:26 +02:00
Stephen Kelly
6649171ddc It should be a moc error for the specified file to not exist.
Currently the missing file is ignored and plugin data is created anyway.

Change-Id: I118fd57b7d05a135e3ff58c0298b25e67cd12587
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-14 10:11:24 +02:00
Jiang Jiang
6da6845f07 Disable hinting for scaled glyphs in FreeType
Scaling hinted glyphs looks ugly, and it makes smooth scaling
animation not possible. Since nothing will work as intended
in hinted mode, we should disable hinting automatically when
glyphs are loaded with scaling transformation.

Task-number: QTBUG-24846
Change-Id: Id7fb5f5bdc2d00be157b0c5d55c316473571473c
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-14 10:11:23 +02:00
Girish Ramakrishnan
cb97d846e2 egl: return EGL config when r/g/b sizes are not set
The check is already done for alpha. Do a similar check for
r/g/b sizes.

The problem was discovered because the default scenegraph context
in QSGContext::defaultSurfaceFormat does not have r/g/b set.

Change-Id: I2f529c9d5cc7dbc61a27722336e8099e7be08965
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-06-14 10:07:23 +02:00
Albert Astals Cid
d40ab8b9f5 Add since 5.0 markers to new QCryptographicHash enums/functions
Change-Id: If367d365510cc7f6bf8f87808f5843c4a41d13e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-14 05:26:49 +02:00
Thiago Macieira
5f5555f4d3 Fix encoding of non-ASCII strings
tr() only takes UTF-8 as input, so we must recode to UTF-8. But we can
use QLatin1String elsewhere.

Task-number: QTBUG-26086
Change-Id: I5932ddc96fb817dbe01106e5f6f2b10f58472d6b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-06-14 05:26:45 +02:00
Shane Kearns
dd9bdf5654 Rewrite QNetworkReply downloadProgress autotest
The existing autotest was made invalid by the downloadProgress
signal choking patch.
Rewrote the autotest to download files from the test server
with some rate limiting applied to ensure more than one signal
is emitted.

Change-Id: I6026bacdf356b4e1796b80f6983e5bdce0d1bfce
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-06-14 05:26:39 +02:00
Shane Kearns
46e40214cf choke uploadProgress signals
The QNetworkReply::uploadProgress signal is intended for updating UI
elements such as a progress bar.
Limit the signal emissions to 10 per second to prevent overloading
the UI with updates.
As with the downloadProgress choke, this is implemented by dropping
signals that occur within 100ms of the previous emission.

The 100% signal is always emitted (bytesSent == bytesTotal)
When the upload size is initially unknown, this behaviour is still
provided by the upload device emitting a suitable readProgress
signal when EOF is reached.

Task-number: QTBUG-20449
Change-Id: I77e03c8a49109106e1c375ee00380293fd326b63
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-06-14 05:26:37 +02:00
Shane Kearns
d6d9c8bf32 choke downloadProgress signals
The QNetworkReply::downloadProgress signal is intended for updating
user interface components (e.g. a progress bar).
Limit signal emissions to 10 times per second, with an additional
signal just before the finished() signal to provide the 100% progress.

For the size of download where a progress bar is necessary, this
update frequency seems sufficient.

The implementation is done by dropping signals which would be emitted
less than 100ms after the previous signal emission.

Task-number: QTBUG-20449
Change-Id: I9c2dbe16c70f3270cbf98f3c74cf9d9a3f0ab900
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-06-14 05:26:35 +02:00
Tasuku Suzuki
5a7937bb04 disable codecs for asian language when QT_NO_BIG_CODECS defined
Change-Id: I45025b13bacc5f63946b02a87c742beff1946c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-14 05:26:26 +02:00