Oswald Buddenhagen [Thu, 12 Apr 2012 10:03:01 +0000 (12:03 +0200)]
remove some qmake -project boilerplate from project files
Change-Id: I5e6103db42b4fcca4ed4c2ffaec71e71e73d5b95
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Thu, 1 Mar 2012 17:10:22 +0000 (18:10 +0100)]
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>
Oswald Buddenhagen [Mon, 2 Apr 2012 17:20:11 +0000 (19:20 +0200)]
-qconfig needs no own switch case any more
Change-Id: I56c14cb7a2bf9e6641c48574d2b13436c1b7f714
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Mon, 2 Apr 2012 17:14:19 +0000 (19:14 +0200)]
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>
Oswald Buddenhagen [Wed, 13 Jun 2012 13:19:46 +0000 (15:19 +0200)]
don't overquote make command
$(MAKE) is apparently already quoted when the path contains spaces
Change-Id: Ie09a0f43083f9eae95fc135c3a74364eaa356934
Oswald Buddenhagen [Wed, 28 Mar 2012 14:00:06 +0000 (16:00 +0200)]
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>
Oswald Buddenhagen [Fri, 1 Jun 2012 14:43:46 +0000 (16:43 +0200)]
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>
Oswald Buddenhagen [Fri, 1 Jun 2012 14:37:42 +0000 (16:37 +0200)]
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>
Oswald Buddenhagen [Tue, 3 Apr 2012 14:50:04 +0000 (16:50 +0200)]
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
Oswald Buddenhagen [Fri, 24 Feb 2012 13:35:56 +0000 (14:35 +0100)]
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>
Oswald Buddenhagen [Fri, 3 Feb 2012 21:13:12 +0000 (22:13 +0100)]
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>
Oswald Buddenhagen [Tue, 31 Jan 2012 17:36:18 +0000 (18:36 +0100)]
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>
Oswald Buddenhagen [Wed, 9 May 2012 16:39:05 +0000 (18:39 +0200)]
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>
Oswald Buddenhagen [Wed, 9 May 2012 13:14:37 +0000 (15:14 +0200)]
Revert "move .qmake.cache search to Option"
We are now moving in the exact opposite direction.
This logically reverts commit
059200a44ba7177d0c9ec6bb5e6ee0b7e0c3f017.
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>
Oswald Buddenhagen [Wed, 9 May 2012 10:47:02 +0000 (12:47 +0200)]
Revert "move finding the makespec to Option"
Needed for an upcoming revert.
This reverts commit
74a6669fa7c0d6e2cb7d34d56332d620d2a07755.
Conflicts:
qmake/option.cpp
qmake/project.cpp
qmake/property.cpp
Change-Id: I56088506d27bf1f095f9261c75224f4bee17ec60
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Bradley T. Hughes [Mon, 18 Jun 2012 10:08:16 +0000 (12:08 +0200)]
QEvent: Don't give DeferredDelete special treatment
After commit
9b07fd0d5cae6846f0eaccf3dc51bc9e78559a05, 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>
Bradley T. Hughes [Wed, 13 Jun 2012 11:23:53 +0000 (13:23 +0200)]
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>
Johannes Zellner [Mon, 18 Jun 2012 22:36:34 +0000 (15:36 -0700)]
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>
Johannes Zellner [Mon, 18 Jun 2012 22:18:43 +0000 (15:18 -0700)]
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>
Samuel Rødal [Tue, 12 Jun 2012 08:21:37 +0000 (10:21 +0200)]
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>
Samuel Rødal [Wed, 13 Jun 2012 15:05:52 +0000 (17:05 +0200)]
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>
Girish Ramakrishnan [Tue, 12 Jun 2012 19:53:31 +0000 (12:53 -0700)]
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>
Jeremy Katz [Mon, 18 Jun 2012 15:06:13 +0000 (17:06 +0200)]
Make QUuid compile with QT_NO_QUUID_STRING
Task-number: QTBUG-24816
Change-Id: I0cbb0581a1c3abefdde75b7cd45fdafd31640f0d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Miikka Heikkinen [Thu, 14 Jun 2012 10:05:34 +0000 (13:05 +0300)]
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>
Thiago Macieira [Mon, 18 Jun 2012 10:15:58 +0000 (12:15 +0200)]
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>
Janne Anttila [Wed, 13 Jun 2012 10:59:54 +0000 (13:59 +0300)]
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>
Konstantin Ritt [Thu, 14 Jun 2012 02:01:23 +0000 (05:01 +0300)]
tst_QChar: drop outdated testcase
Change-Id: I0c06643165b299c552c697f400608e29ae4e7f7a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Konstantin Ritt [Mon, 11 Jun 2012 18:51:33 +0000 (21:51 +0300)]
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>
Konstantin Ritt [Mon, 11 Jun 2012 18:45:59 +0000 (21:45 +0300)]
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>
Berthold Krevert [Wed, 6 Jun 2012 11:52:29 +0000 (13:52 +0200)]
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>
Stephen Kelly [Fri, 8 Jun 2012 11:58:16 +0000 (13:58 +0200)]
Add automatic metatype declaration for QPointer and QWeakPointer.
Change-Id: Ic9a04fa68d0bb14ef07455a6559e59f4b887f38b
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Jonathan Liu [Thu, 14 Jun 2012 12:31:38 +0000 (22:31 +1000)]
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>
Jonas M. Gastal [Wed, 13 Jun 2012 00:27:21 +0000 (21:27 -0300)]
Fix double error setting, which overrode correct value.
Change-Id: I3bc992b8b41f305a01b80bca16346e18ac4d7833
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Thu, 14 Jun 2012 13:04:22 +0000 (15:04 +0200)]
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>
Johannes Zellner [Thu, 14 Jun 2012 01:21:35 +0000 (18:21 -0700)]
eglfs: Pass QSurfaceFormat to createNativeWindow() hook
Change-Id: Ib352d8591360a224359ef218b95cd27cdfaf81aa
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Girish Ramakrishnan [Wed, 13 Jun 2012 23:38:27 +0000 (16:38 -0700)]
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>
ABBAPOH [Thu, 14 Jun 2012 08:49:51 +0000 (12:49 +0400)]
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>
Thiago Macieira [Thu, 14 Jun 2012 13:03:33 +0000 (15:03 +0200)]
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>
David Faure [Thu, 24 May 2012 08:36:01 +0000 (10:36 +0200)]
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>
Jeremy Katz [Thu, 17 May 2012 14:37:43 +0000 (16:37 +0200)]
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>
Jani Honkonen [Thu, 7 Jun 2012 14:39:21 +0000 (16:39 +0200)]
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>
Stephen Kelly [Wed, 13 Jun 2012 17:31:18 +0000 (19:31 +0200)]
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>
Jiang Jiang [Mon, 11 Jun 2012 10:46:17 +0000 (12:46 +0200)]
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>
Girish Ramakrishnan [Wed, 13 Jun 2012 22:15:12 +0000 (15:15 -0700)]
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>
Albert Astals Cid [Wed, 13 Jun 2012 09:50:31 +0000 (11:50 +0200)]
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>
Thiago Macieira [Tue, 12 Jun 2012 11:08:43 +0000 (13:08 +0200)]
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>
Shane Kearns [Thu, 31 May 2012 17:27:23 +0000 (18:27 +0100)]
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>
Shane Kearns [Mon, 28 May 2012 15:27:58 +0000 (16:27 +0100)]
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>
Shane Kearns [Thu, 24 May 2012 15:14:28 +0000 (16:14 +0100)]
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>
Tasuku Suzuki [Fri, 1 Jun 2012 03:42:50 +0000 (12:42 +0900)]
disable codecs for asian language when QT_NO_BIG_CODECS defined
Change-Id: I45025b13bacc5f63946b02a87c742beff1946c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Konstantin Ritt [Mon, 11 Jun 2012 12:14:25 +0000 (15:14 +0300)]
Regenerate the Unicode tables
Change-Id: I64b93ba8ec85eff5e308d92c57e98e8745c43d66
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Konstantin Ritt [Mon, 11 Jun 2012 12:19:24 +0000 (15:19 +0300)]
Make QUnicodeTables::script() support SMP code points
Instead of expanding the scripts table with script values for the code points
>= 0x10000, it has been merged with the properties table in order to
increase perfomance of the script itemization code (not affected yet).
(Stats: the properties table grew up in 97428-89800 = 7628 bytes;
the old scripts table was of size 7680 bytes)
The outdated ScriptsInitial.txt and ScriptsCorrections.txt file has been removed
(they were just empty, the "corrigendum" script corrections should be applied
to Scripts.txt directly, *no customization allowed*!).
More script testcases has been added - at least one per supported script.
Task-number: QTBUG-6530
Change-Id: I40a9e76f681e2dd552fd4c61af0808d043962e79
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Konstantin Ritt [Sun, 10 Jun 2012 15:30:10 +0000 (18:30 +0300)]
QFontMetrics/QRawFont: Optimize SMP code points handling a bit
Calling QString::fromUcs4() for the single UCS-4 -encoded character is quite suboptimal
since the BOM detections and the resulting QString aren't really used;
all we need is to split the UCS-4 code point into the UCS-2 surrogate pair.
Change-Id: Ia5b68312909bf551cf2493d9e2752a7d7d837fb9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Konstantin Ritt [Mon, 11 Jun 2012 15:04:17 +0000 (18:04 +0300)]
Add the AGLFN tables generator, update the tables up to AGLFN 1.7
Task-number: QTBUG-21727
Change-Id: Ib2cacc2a52b2853059d6c873a33dcde735fbe168
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Konstantin Ritt [Sun, 10 Jun 2012 15:05:41 +0000 (18:05 +0300)]
AGLFN: optimize glyph name lookup and reverse map creation
Use binary search in glyph name lookup, drop the linear search sentinel (0xFFFF);
Pass the reverse map by ref, initialize with memset.
Change-Id: I56de64bf2352af0615787e4cc0e13c922c640822
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Friedemann Kleint [Tue, 12 Jun 2012 08:47:42 +0000 (10:47 +0200)]
Introduce QPA API for size grip handling.
- Introduce API to do size grip handling (mouse press
and move).
- Move Windows code to Windows plugin.
- Move X11 code to XCB plugin and activate it.
Change-Id: I2f61d6ddc1fa07447e668554d41ecc820efca23f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Friedemann Kleint [Wed, 13 Jun 2012 10:42:45 +0000 (12:42 +0200)]
Windows: Fix warnings about being unable to load fonts from font dir.
Do not call QPlatformFontDatabase::populateFontDatabase(), which
tries to load qpf2-fonts from the Qt library directory.
This directory is not installed on Windows.
Note: This affects non-in-source builds only.
Task-number: QTBUG-26066
Change-Id: I5782e61965958fc48e0edd7a3d50eef325529708
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Sean Harmer [Tue, 12 Jun 2012 11:30:13 +0000 (12:30 +0100)]
Do not add debug/release to QMAKE_CONFIG. Let module system enable them
This solved QTBUG-26111 in which qtjsbackend gets built with an
incomplete framework on Mac OSX. This was traced back to commit
6a6fd56e662b2c1a581727f7ec44d5bd60913ad4 which moved QMAKE_CONFIG
values from .qmake.cache to mkspecs/qmodule.pri. Since qtjsbackend
contains config tests it creates its own .qmake.cache which was
previously masking this issue.
QMAKE_CONFIG incorrectly contained debug for debug_and_release builds
even though debug and release are already present in the CONFIG variable
in mkspecs/qconfig.pri. The changes to configure prevent CONFIG in
qmodule.pri from containing debug and release variables and ensure
that QT_CONFIG contains build_all and debug_and_release if appropriate.
Configure.app is also adjusted to match this behaviour.
The other part of the change is to qt_module_config.prf and
qt_plugin.prf. These changes take care of populating CONFIG with
the appropriate debug_and_release and build_all variables depending
upon what is present in QT_CONFIG. This ensures that the Qt modules
and plugins get built with the same configuration as qtbase.
The special handling for the qcocoa QPA plugin ensures that it is
built in release mode only to preserve the behaviour introduced by
commit
5603f94eaa538dbe28fc426065d65a27799adedc.
Task-number: QTBUG-26111
Change-Id: I6f65aba50709e1b2431b8b4411ff30a06f7d8aed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Morten Sorvig [Wed, 13 Jun 2012 08:01:54 +0000 (10:01 +0200)]
Compile.
Expressions containing "reinterpret_cast" are not
constant expressions according to C++11 rules.
Change-Id: Id97729f184983e5bdda180b99cfbe27e2768e09e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Toby Tomkins [Tue, 12 Jun 2012 02:51:32 +0000 (12:51 +1000)]
Fix namespace compilation on OSX.
Change-Id: Ib579ae298a5f894b8b02a5d56567870109bd29bd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
João Abecasis [Fri, 8 Jun 2012 12:30:50 +0000 (14:30 +0200)]
Remove unneeded #includes and namespace wrappers
qvector.cpp no longer contains any code, now that inline functionality
has been deferred to QArrayData.
Change-Id: I000ef8507e5b8438edd32a762750e4ceaa8aa8ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Sean Harmer [Fri, 8 Jun 2012 10:18:18 +0000 (11:18 +0100)]
OpenGL: Update QOpenGLFunctions docs to remove widget code
Change-Id: I4246a49444c09d899f2bd7cd2e9353ee0a6859bf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Friedemann Kleint [Wed, 13 Jun 2012 13:08:07 +0000 (15:08 +0200)]
QtWidgets: Fix warnings about deprecated QGraphicsView functions.
Warnings introduced by
d76de69b4b60e7e13d5b0602768702e4bf219804 .
Change-Id: I613500074a2318a617f18d5b887840ecc3408237
Reviewed-by: Gatis Paeglis <gatis.paeglis@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Gatis Paeglis [Tue, 12 Jun 2012 13:53:44 +0000 (15:53 +0200)]
Change path for 'mousebuttons' widgets example
Task-number: QTBUG-26121
Change-Id: Icaeb6038d166fb0ffadf1657ddef21c18b3d3be6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Gatis Paeglis [Wed, 13 Jun 2012 12:19:54 +0000 (14:19 +0200)]
Add install path for qpa windows example
Task-number: QTBUG-26150
Change-Id: I8e981318e05cca6628160aea31281f8e3baaa50f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Casper van Donderen [Tue, 12 Jun 2012 15:22:20 +0000 (17:22 +0200)]
QDoc: Check if index file was already inserted in list.
Previously it was possible to insert exactly the same index file in the
map twice by specifying an -indexdir which is the same as -installdir.
Probably you can also have two indexes with the same name that happen to
have the same creation time, but changes of that happening are slim to
none.
Change-Id: I6be5fb9d04839026830b9948887b282489b379c0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Gunnar Sletta [Wed, 13 Jun 2012 10:39:38 +0000 (12:39 +0200)]
Remove downstream documentation references from gui
Change-Id: I6c107ed1f1cabe3713e22ec1c7854d5c07dca4b5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Sean Harmer [Wed, 6 Jun 2012 14:08:42 +0000 (15:08 +0100)]
QNX: Enable additional CPU features to be compiled in for QNX
The QNX toolchain can use Neon on ARM and SSE<X> on x86/x86_64.
Change-Id: I36c61fa12b65d806b3cc60a0aefcb63964f9ab7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Girish Ramakrishnan [Tue, 12 Jun 2012 17:59:27 +0000 (10:59 -0700)]
Deliver wheel events when window is null
The generic input plugins do not set the window parameter. So,
use the same technique we use with mouse event handling to determine
the window to deliver the event to.
Done-with: Johannes Zellner
Change-Id: I950c0ad2f330dccfdcc41b8d01f62cd39902bc9c
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Thiago Macieira [Tue, 22 May 2012 13:15:24 +0000 (15:15 +0200)]
Fix QUrl documentation: FullyDecoded and DecodedMode are a pair
DecodedMode with FullyEncoded makes no sense whatsoever.
Change-Id: I182db7aceb38e4e9398138066022912adec9c413
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Wed, 13 Jun 2012 18:30:21 +0000 (20:30 +0200)]
Fix QDnsLookup test again after public DNS servers changed
gitorious.org's IP no longer resolves back to gitorious.org.
This fix is temporary, again.
Change-Id: I85b5fe1c5e603d23dd3226b843ef42165d4c417b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Girish Ramakrishnan [Mon, 11 Jun 2012 15:04:41 +0000 (08:04 -0700)]
eglfs: mark overriden methods with Q_DECL_OVERRIDE
The current cursor implementation can be a bit hard to read
without hints about which methods are overriden.
Change-Id: I3376890a13be46e1ece03d1442dd5a15ccd61382
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Girish Ramakrishnan [Tue, 12 Jun 2012 16:06:54 +0000 (09:06 -0700)]
printersupport: Fix cups.pro qmake warning
Change-Id: I59c8e3021fbf733af003ebd99be4a63e0a68f155
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Simon Hausmann [Tue, 12 Jun 2012 07:57:10 +0000 (09:57 +0200)]
Partial fix for WebKit compilation on Windows
qdatetime.h uses std::min/max and on Windows windows.h (or some subsequent
header file) may under certain circumstances define min/max as macros.
The easiest way to prevent the windows header files from doing that is to
define NOMINMAX in the place right before windows.h is included. The other
way is to define min and max to min/max themselves to prevent windows.h
from doing its evil thing.
If a user of Qt (WebKit in this case) chooses the approach of defining
min/max to themselves and then includes qdatetime.h, then a subsequent
inclusion of windows.h doesn't work because qdatetime.h undefines min/max.
We should not enforce the type of workaround needed, therefore this patch
removes the workaround from qdatetime.h and requires user code that
happens to include windows header files before qdatetime.h (seldom case)
to choose either workaround.
Change-Id: I7347eec7369491a065e894cff557004e069453d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
ABBAPOH [Sat, 9 Jun 2012 12:22:50 +0000 (16:22 +0400)]
AbstractItemView editorForIndex/indexForEditor speedup
Frequent calls to editorForIndex/indexForEditor are very slow because of an implicit
conversion from QModelIndex to QPersistentModelIndex.
This fix allows to avoid unnecessary conversions when there are no open
editors (most common case)
Change-Id: Ic072880c9f33a43a20b2a61a42c3ba215c5c33cb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Friedemann Kleint [Mon, 11 Jun 2012 14:13:24 +0000 (16:13 +0200)]
Send key events to pop-up widget in case there is one.
Make QApplicationPrivate::inPopupMode() static for
convenience.
Task-number: QTBUG-26095
Change-Id: I98dc1e40d357592b790cd51d7aca60c2be9f380f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Andy Shaw [Fri, 8 Jun 2012 11:02:49 +0000 (13:02 +0200)]
Fix compile issue on AIX
Since local thread storage is used we need to turn this on for the xlc
compiler with the -qtls flag.
Change-Id: Ib40ec87edada56a062b0c72b7d47b38a6d0b5b13
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Lars Knoll [Mon, 11 Jun 2012 14:15:39 +0000 (16:15 +0200)]
Don't use gcc extension for QByteArrayLiteral neither
This extension doesn't work for e.g. default arguments
in function declarations.
Change-Id: I32b7afa6e01b6af55fb2409179b4fd94cb04cd8d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Thiago Macieira [Mon, 11 Jun 2012 11:38:41 +0000 (13:38 +0200)]
Keep the #ifdef for tracking shared pointers in a single function
If we have it in different functions, then different out-of-line
implementations could be selected for each object file, resulting in
invalid states. The error I caught was when wrapper.cpp was compiled
without tracking and, therefore, did not place a call to
internalSafetyCheckAdd. However, it called an out-of-line copy of
QtSharedPointer::ExternalRefCountWithCustomDeleter::create, which did
set the deleter to remove the safety check.
Therefore, keep everything in one function.
Change-Id: Ib2c6a606699db49d102704bccdd331ec22a8bd78
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 23 May 2012 17:54:49 +0000 (19:54 +0200)]
Simple optimisation for the construction of a QSharedPointer
Let the constructor initialise the "value" member.
In the case of create(), which already initialised "value", simply
merge the two functions for more readability.
Change-Id: I5638b3d42af3d0f5988f815e0f91d591fa1897a8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 23 May 2012 17:46:39 +0000 (19:46 +0200)]
Use the copy & swap trick to simplify some code in QSharedPointer
Change-Id: I5fa2fae19126bea60b9682ed7765681dd6da8c15
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 23 May 2012 17:36:56 +0000 (19:36 +0200)]
Now merge the QtShared::ExternalRefCount class into QSharedPointer
Completing the work of the previous commit: we don't need separate
classes. Merge into the main class's body.
Change-Id: I2f89b34cb6b7f5f9e8d8b809bebd86656f458644
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thiago Macieira [Wed, 23 May 2012 16:39:36 +0000 (18:39 +0200)]
Merge QtSharedPointer::Basic into QtSharedPointer::ExternalRefCount
The basic class existed for legacy only, when internal reference
counting was a goal. Since it isn't anymore, we can remove the
distinction and simply merge the two classes.
Change-Id: Ib7a1c4158a8d71e71fa6afa447938b8b85ddae87
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thiago Macieira [Wed, 23 May 2012 16:21:16 +0000 (18:21 +0200)]
Merge two internal classes of QSharedPointer and de-virtualise them
The two classes are QtSharedPointer::ExternalRefCountData and
ExternalRefCountWithDestroyFn. The split existed because of what Qt
4.5 did before custom deleters existed: the ExternalRefCountData class
was a virtual class that contained a destroy() virtual, which was in
charge of deleting the data or returning false if it didn't.
Turns out that virtual classes was a mistake. This commit
de-virtualises them -- we couldn't do it in Qt 4 because of binary
compatibility. This saves us one pointer-size in the size of the
private, plus the fact that fewer symbols are required (there is no
virtual table to be initialised).
Additionaly, since a deleter is always stored with the reference
count, we don't need the split between the two classes anymore.
Change-Id: I1cd9400561dcee089a406a57bd856b1730f18afc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 23 May 2012 14:10:56 +0000 (16:10 +0200)]
Remove "delete value" from QSharedPointer
This allows a QSharedPointer to be used in contexts where the class in
question is still forward-declared. This produced a warning in Qt 4 due
to the expansion of the template, even if there was no chance of the
pointer being deleted there (because the reference count could not drop
to zero).
Now, not only is the warning removed, but you can actually have the
reference count drop to zero in a forward-declared class and it will
do the right thing. That's because the deleter function is always
recorded from the point of construction and we're sure that it wasn't
forward-declared.
The unit test for forward-declarations had to be rewritten. The
previous version was passing only because the QSharedPointer object
was created under the "tracking pointers" mode, which causes a custom
deleter to be used in all cases.
Task-number: QTBUG-25819
Change-Id: Ife37a4cea4551d94084b49ee03504dd39b8802c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Girish Ramakrishnan [Fri, 8 Jun 2012 22:26:54 +0000 (15:26 -0700)]
-device: Use $1 instead of $VAL
$VAL just happens to work in resolveDeviceMkspec because it is
set in the parent shell environment when the function is called.
Change-Id: I67350f2a9e790cc7eca2a73ef6a4a0d7f09b8d3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Mark Brand [Tue, 12 Jun 2012 08:41:38 +0000 (10:41 +0200)]
add SSE2/AVX/Neon/etc. flags to mkspec win32-g++-cross
Follow-up to
6a51062e996ec38b3ebc1e0de04af73a5c62a1a0 which did this
for win32-g++.
Change-Id: I3ba0dd8ffca46853844b55b16dc92270fa8a623a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Holger Hans Peter Freyther [Tue, 12 Jun 2012 09:38:50 +0000 (11:38 +0200)]
mips: dsp and dspr2 can be enabled separately fix dspr2 only compilation
Separate dsp and dspr2 handling. The configure script allows to disable
them separately and with this patch it is possible to compile a dspr2
only libQtGui.so.
Change-Id: Ifca583c9b46a25c93751967a31ac77eafc5d51e4
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Gatis Paeglis [Thu, 7 Jun 2012 14:13:28 +0000 (16:13 +0200)]
Fix Qt5 To-Do's in QGraphicsItem
- Merge isObscured()
- Deprecate and inline obsolete methods
- Correct outdated documentation
Change-Id: I4eb29df78785794c6d134bf9c2f5e0f3c3d6a29f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Mark Brand [Tue, 15 May 2012 11:53:46 +0000 (13:53 +0200)]
fix default platform plugin for windows using configure script
Follow-up to
0074cc5d34a8ee314e864ba488dab1f0d0f94995.
The configure script can be used for cross-building for Windows on
unix.
Change-Id: Ie7f9d0ff308ad5763cdf7b2664fa255e89bd5013
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Andy Shaw [Fri, 1 Jun 2012 23:49:18 +0000 (01:49 +0200)]
Remove unnecessary code from the XCode generator
Since we only support XCode 3 and later, then all of the legacy code can
be safely removed.
Change-Id: I9be8555aaa62c716b2277c2b97f41aa02d27ef13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Friedemann Kleint [Tue, 12 Jun 2012 07:11:19 +0000 (09:11 +0200)]
Remove unused static functions from qlogging.cpp, qstring.cpp.
Change-Id: I4e9642b5e7fb57ac56511ae06af6ce416d0401ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Thiago Macieira [Mon, 11 Jun 2012 10:28:22 +0000 (12:28 +0200)]
Export qMemSet and qMemCopy properly
Commit
d839564c94a73e3dd2816a8c2196e612e1f5cb79 was incomplete. It
added the Q_CORE_EXPORT macro to qmalloc.cpp, but the qMemSet and
qMemCopy function bodies are in qglobal.cpp.
Change-Id: I24ee44f04365d8dbdf3f1c0f22b6a72cae9f96bb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Thiago Macieira [Tue, 12 Jun 2012 12:44:24 +0000 (14:44 +0200)]
Update listing of when SSSE3 and SSE4.1 first became available
SSSE3 was first available on the original Intel Core 2 processors, so
add the "Merom" codename. SSE4.1 was available on the 45 nm shrink of
those processors, codename "Penryn", not on the next architecture.
Change-Id: I5fd92db62aa409b7f4e46f9b24d960519177f811
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Thiago Macieira [Fri, 30 Dec 2011 00:44:16 +0000 (22:44 -0200)]
Add configure-time checking for the SSE and AVX features on Windows
Modify configure.exe to run some configure-time tests and check if
the SSE and AVX compiler features are supported.
The tests themselves required a bit of changes to compile with
MSVC. The include in sse4_2.cpp was wrong. And for whatever reason, it
didn't like the volatile variables, which GCC, Clang and ICC have been
happy with. This should produce no effect in compilation, though: even
dead code must be syntactically correct. We're not running the output.
Change-Id: Ibe5d0904a378a7efed853c7215f88a2ddcefb1b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Lars Knoll [Tue, 12 Jun 2012 09:43:45 +0000 (11:43 +0200)]
Make sure you can link against more than one static plugin
The old macro was leading to symbol clashes.
Change-Id: I090c511d4090bc96fc6c88537fae7bbe7f143b6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Bradley T. Hughes [Fri, 8 Jun 2012 11:37:27 +0000 (13:37 +0200)]
Cocoa: re-enable getUrl: and appleEventQuit: AppleEvent handlers
The getUrl: and appleEventQuit: handlers are only called if we register
them with the NSAppleEventManager. The Cocoa documentation says the best
place to do this is in the applicationWillFinishLaunching: delegate
method, so add this method and move the code from
qcocoaeventdispatcher.mm to there. Since QCocoaApplicationDelegate is
only used when AA_MacPluginApplication is not set, we do not need to
check again in the delegate code. Be sure to remove these event handlers
when shutting down the application.
For the getUrl: handler, send file open events when receiving this
event. This restores Qt 4 behavior.
Remove the qDebug() from the appleEventQuit: handler.
Change-Id: Ibcbdd541695176e3d236366d4d541e4811882d6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Fri, 8 Jun 2012 11:13:23 +0000 (13:13 +0200)]
Cocoa: Remove unused QApplicationPrivate from QCocoaApplicationDelegate
To avoid a QtWidget dependency, we should use QGuiApplicationPrivate
isntead, but instead of storing, we can use
QGuiAppliationPrivate::instance() instead.
Change-Id: If3f63fee804b7ad32fe8d612bf70c051b70f54c8
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Chris Meyer [Thu, 7 Jun 2012 14:42:43 +0000 (16:42 +0200)]
Fix QTreeView header re-ordering bug on Mac OS.
This is a cherry-pick of
0ba850c7a2dbccb8dd6aa1664679bda6cce95065
When the mouse button is released at the end of a drag, Cocoa
may simulate an extra mouse moved event. However, the state of
the buttons when this event is generated is already 'no button'.
This leads to some failsafe code canceling out of the drag state
and when the actual mouse release event is finally processed, the
header drag state has already been exited and the header drag
fails.
This patch disables the failsafe code on Cocoa and makes header
dragging work when the mouse goes outside the bounds of the header
view.
Task-number: QTBUG-14179
Change-Id: Ia9fd1ac79f9e7b4b90d3e160298c53d65fb171d3
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Stephen Kelly [Thu, 24 May 2012 12:23:54 +0000 (14:23 +0200)]
Fix automatic declaration of QSharedPointer<T> metatypes.
QSharedPointer doesn't work like the other automatic template metatype
declarations because in some cases T* is declared as a metatype, but we
are interested in QSharedPointer<T> (eg QObject*). In other cases, T is
declared as a metatype and we are interested
in QSharedPointer<T> (eg char).
In particular the macro used before this patch was attempting to get the
metatype id of the element_type using for example qMetaTypeId<QObject>()
instead of qMetaTypeId<QObject*>(), which did not work.
Similarly, the variadic macro driven test is no good, because it was
testing QSharedPointer<QObject*> instead of QSharedPointer<QObject>,
so that is removed.
In the end, the only thing we can sensibly automatically declare as
metatypes are QSharedPointers to QObject derived types. That is also
the type that makes the most sense in a QML context anyway.
Change-Id: I13dd40147e2e6bedf38661f898102abaaaa96208
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>