Oswald Buddenhagen [Wed, 29 Feb 2012 14:56:28 +0000 (15:56 +0100)]
remove assignment of QMAKE_MOC & QMAKE_UIC from mkspecs
there is entirely no point in having it there.
Change-Id: Ie2fc1e94495119725131cbd50564648cbb4a7dc8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Marc Mutz [Fri, 24 Feb 2012 21:27:32 +0000 (22:27 +0100)]
QtGlobal: remove qIsDetached()
There's not a single in-tree user of this function, and
the concept is a broken one in MT programs: By the time
qIsDetached() returns, the result can already be
different due to another thread taking a copy, or a
copy in another thread being destroyed (note that this
doesn't require mutex use by the user, since we promise
(implicitly, if not explicitly) that you can copy from
const objects without holding a lock).
QTBUG-10813 talks about a use in QCache::trim(), but
677cf76340f88e0fe51c1f75aa512b6d835414ca removed it, so
there's no reason to keep it anymore.
Change-Id: I20380c12bdf00ac764b89d84392f0f34727b1971
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Marc Mutz [Thu, 1 Mar 2012 09:14:08 +0000 (10:14 +0100)]
QInputMethodEvent::Attribute: mark as Q_MOVABLE_TYPE
Change-Id: Ifb41afdcf17fa8192f37b4900c59e81d4e0bf60f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Tue, 28 Feb 2012 18:54:46 +0000 (19:54 +0100)]
QPair: specialise QTypeInfo based on the typeinfos of its arguments
Specialise QTypeInfo<QPair<T1,T2>> based on the properties of
T1 and T2:
- If either T1 or T2 is Q_COMPLEX_TYPE, so is QPair<T1,T2>.
- Otherwise, if either T1 or T2 is Q_MOVABLE_TYPE, so is QPair<T1,T2>.
- Otherwise, QPair<T1,T2> is Q_PRIMITIVE_TYPE.
Change-Id: I8aecbd37e3b7924f77f38967498deabf1a19ca24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Stephen Kelly [Wed, 29 Feb 2012 22:53:20 +0000 (23:53 +0100)]
Make some tests and benchmarks pass with QT_NO_QSTRINGBUILDER
Change-Id: I6c91a613007043d0f26ac11e98353a0b9ce646ae
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Marc Mutz [Tue, 28 Feb 2012 23:00:27 +0000 (00:00 +0100)]
QEvent (and subclasses): make ctors explicit
Do this regardless of whether the event subclass
is public API or only used in examples. Examples
are examples, used by others as templates or even
copied verbatim, so they should also follow sound
engineering rules.
Anyway, there's only one in examples/...
Change-Id: I586ff16407a956c9e89288fdd4377eed73f45c0f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Stephen Kelly [Wed, 29 Feb 2012 11:57:34 +0000 (12:57 +0100)]
Fix build of QNetworkReply benchmark with QT_USE_QSTRINGBUILDER.
Change-Id: Ie46126aed0d2e83dc7784c027066c789d3fd7652
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Marc Mutz [Sun, 26 Feb 2012 22:01:46 +0000 (23:01 +0100)]
QFlags: mark as Q_PRIMITIVE_TYPE
I originally tried to put Q_DECLARE_TYPEINFOs into
Q_DECLARE_OPERATORS_FOR_FLAGS, to declare not only
the flags type, but also the underlying enum as
primitive, but too many users (arguably correctly)
used Q_DECLARE_OPERATORS_FOR_FLAGS at (non-global)
namespace scope where QTypeInfo would have been
specialised in the wrong namespace.
So specialise QTypeInfo for QFlags<T> only.
Change-Id: I4af6e29aefbd9460a3d2bc6405f03cdf6b1096bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Stephen Kelly [Tue, 28 Feb 2012 14:46:01 +0000 (15:46 +0100)]
Make loadAcquire const.
Change-Id: Iad2d60d1abe363a3b85eaf152861d0979a997d81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Olivier Goffart [Tue, 28 Feb 2012 08:34:20 +0000 (09:34 +0100)]
Add operator<<(QTestData &, QStringBuilder)
So this code still compiles with QStringBuilder
QTest::newRow("foo") << foo + bar;
Change-Id: Ie82a21c8fd07ec2d27ad85015aa1a0c4e94700d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Marc Mutz [Tue, 28 Feb 2012 21:39:07 +0000 (22:39 +0100)]
QCryptographicHash: make constructor explicit
The copy constructor of QCH is disabled, so there's
no point in providing an implicit conversion from
the Algorithm enum anyway, so make the ctor explicit.
Change-Id: I4ea74ffb0963b4f49415da17778c3e6050454a6b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Oswald Buddenhagen [Tue, 28 Feb 2012 10:01:52 +0000 (11:01 +0100)]
make qlibraryinfo table-driven
switch blocks are noisy. this is nicer.
reshuffled the LibraryLocation enum to make table lookups possible and
future-safe.
using pointer-free tables to avoid adding data relocations.
Change-Id: I70ec2c2142ce02a15e67284e4b285d754d930da3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Oswald Buddenhagen [Tue, 28 Feb 2012 09:20:34 +0000 (10:20 +0100)]
remove bizarre padstring voodoo
evidently, The Author had no clue that the compiler will do that
automatically.
as it happens, the windows configure already did it right.
Change-Id: I7ebc018c254b316205348874ffa527526329b630
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Oswald Buddenhagen [Tue, 28 Feb 2012 08:54:53 +0000 (09:54 +0100)]
remove pointless ifdefs
configure always defines all of these constants. the exception is
SettingsPath which is unix-only, so make the #ifdef explicit about that.
Change-Id: I339d2d7cb9d188a8e74d79310c3a80b5d4dbb806
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Oswald Buddenhagen [Tue, 28 Feb 2012 13:49:19 +0000 (14:49 +0100)]
don't duplicate QLibraryInfo declaration
there is no reason for doing that. there is even reason for *not* doing
it (the enums running out of sync).
Change-Id: Ieb7d015ca497a6675cc85da4c2e0af0c1533dd7a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Stephen Kelly [Wed, 29 Feb 2012 10:54:29 +0000 (11:54 +0100)]
Allow QChar::SpecialCharacter with QStringBuilder.
Change-Id: I3c91fd516bb13e5534aa6f26ee9df745c990dfb5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Stephen Kelly [Mon, 27 Feb 2012 20:57:12 +0000 (21:57 +0100)]
Make qobject_p.h not need qvariant.h.
Move definition of ExtraData to the implementation file.
As a side effect, we need to include qhash.h
in some other places.
Change-Id: I8bb4ec0940ae51c7d6961c9a51adb80fd444e1e3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Stephen Kelly [Mon, 27 Feb 2012 21:06:54 +0000 (22:06 +0100)]
Make qlocale.h not depend on qvariant.h.
As a consequence, we have to add more explicit includes.
Change-Id: Ib3137031f0554b846c7bbd08f1f7df10dfeb8e61
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Marc Mutz [Tue, 28 Feb 2012 21:27:48 +0000 (22:27 +0100)]
QScopedValueRollback: make constructor explicit
I'm not even sure whether you could implicitly
convert a T& into a QScopedValueRollback<T>,
seeing as the constructor takes a non-const
reference, but it looks wrong without explicit
and
QObject o = new QObject(parent);
also won't compile even with implicit QObject(QObject*)
under a conformant compiler because of the disabled
copy constructor, and we still make QObject(QObject*)
explicit, so add it here, too.
Change-Id: I722a6e8431644e450fe2b401ccfb707a8e982380
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Stephen Kelly [Wed, 29 Feb 2012 11:28:57 +0000 (12:28 +0100)]
Remove include for no-longer-supported compiler.
Change-Id: I162da3e373a0191f69e50e110114ef78c2d5fc66
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Rohan McGovern [Tue, 28 Feb 2012 23:18:59 +0000 (09:18 +1000)]
Merge master -> api_changes
Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac.
Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
Jason Barron [Thu, 9 Feb 2012 08:51:24 +0000 (09:51 +0100)]
Add a new qmake feature to support OpenGL ES 1 apps
This is a convenience to make it easy for applications to simply add:
CONFIG += opengles1
To their .pro file to link against OpenGL ES 1.1 instead of OpenGL ES V2
Change-Id: I48605f5f69f83d99cfb2ad6dbb4b318d41e00128
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Stephen Kelly [Mon, 27 Feb 2012 15:45:27 +0000 (16:45 +0100)]
Make the CMake files work with directory overrides.
This allows us to create correct CMake config files when Qt is
configured with directories outside of the prefix (which Qt allows),
and also allows us to use correct values when a 'longer' relative
lib directory is used such as lib/x86_64-linux-gnu.
Change-Id: I6f88255a23752dc5b84cb20ce13fdeeee9d5ad51
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Bradley T. Hughes [Tue, 28 Feb 2012 08:25:20 +0000 (09:25 +0100)]
Compile SHA-2 code on systems without stdint.h
stdint.h is a C99-ism, which isn't available everywhere. The sha.h
header tells us we need 4 typedefs. Add these to qcryptographichash.cpp
before including sha.h and comment out the stdint.h include in sha.h.
Change-Id: I1ede9569fa7eaa84de3befeb3c58cc6a05aa522c
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Friedemann Kleint [Tue, 28 Feb 2012 11:35:48 +0000 (12:35 +0100)]
Skip QLocale test on Windows, improve process handling.
- Skip the failing windowsDefaultLocale() test.
- Improve the handling of the subprocess, locate
the binary in initTestCase instead of repeatedly searching it.
- Make all applications console/non-app bundles.
Task-number: QTBUG-24543
Change-Id: I79dfaa3320cd5698f02e74a3fe53477d4a79d4fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Pekka Vuorela [Thu, 23 Feb 2012 15:27:53 +0000 (17:27 +0200)]
Rename remaining references to QInputPanel
Change-Id: I747d37d10c78af6ad00322d5bd8d29c6b343828c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Miikka Heikkinen [Tue, 28 Feb 2012 10:58:02 +0000 (12:58 +0200)]
Fix QLibrary autotest for Windows
The libraries were built into wrong directory in Windows. Fixed it so
that the libraries are built into debug and release directories like
the test executable.
Also fixed QMAKE_CLEAN statement, which was using incorrect separator.
Task-number: QTBUG-24151
Change-Id: Iade656af5f83ef2b79c2b9c4177df4a16b2f6821
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Sean Harmer [Thu, 19 Jan 2012 20:10:43 +0000 (20:10 +0000)]
Initial import of the Blackberry QPA plugin for Qt5
This is dependent upon the following Change Id's:
I5ebcffb7153f4216d69921d4818051e6b3d14d8a
Iec065f528f5edd848be580807a607488dc2e401f
Change-Id: I234e3c4272d7474d8f8e20fc4fea20d95c829cb5
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Oswald Buddenhagen [Fri, 24 Feb 2012 18:20:00 +0000 (19:20 +0100)]
simplify loop over modules
the earlier done topological sort already removes duplicates and only
works with lower-cased names anyway, so we can remove the overhead here.
Change-Id: I44fc39af9e94662717e1c8cfb0ddb87d2f597935
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Olivier Goffart [Sat, 25 Feb 2012 19:48:56 +0000 (20:48 +0100)]
moc: Only generate IndexOfMethod for signals.
moc is currently generating code to convert from a pointer to member
function of a slot or signal to its index.
The idea was that it could be usefull for slots to have the new syntax
do the same as the old one (connecting signal index to slot index). But
in practice, the new syntax do not use the IndexOfMethod for slots.
Also, it does not work for all the slots (no Q_PRIVATE_SLOT,
no static slots)
So since it is not used, and that it would take room in the binaries to
generate all the code to get the index of slots, we remove it.
If ever we need it, we can still add it later.
Change-Id: Ia417e3e524d7915ca86433ea86c66ac2b299c81a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Rohan McGovern [Tue, 28 Feb 2012 05:02:01 +0000 (15:02 +1000)]
configure: fixed qconfig.h symlink warnings
configure was unconditionally attempting to create two symlinks to
qconfig.h: include/Qt/qconfig.h, and include/QtCore/qconfig.h.
include/Qt doesn't exist any more, so this would always cause a
"No such file or directory" warning. Remove that one.
include/QtCore/qconfig.h is usually created by syncqt now, so this would
cause a "File exists" warning. Make that one conditional.
Change-Id: I8c6244dcbcf9765444f0d5c40c91a0ca192ecbcb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Marc Mutz [Mon, 27 Feb 2012 23:11:28 +0000 (00:11 +0100)]
QDomNode: don't needlessly call virtual functions
Commit
4dabe78387d10495f9f6d0a7395f2ba3c80432bd changed
these functions from virtuals to inlines that check the
return value of the remaining virtual function nodeType().
However, two of the functions call nodeType() more than
once, which we know will return the same result each time,
but requires a compiler with interprocedural optimization
capabilities to figure out by itself.
So instead of repeatedly calling nodeType(), call it once
and store its return value in a temporary, and use the
temp for further comparisions.
Change-Id: Idbeafb7fd93d275d475218c6df2ad7fdc9162cc5
Reviewed-by: Richard J. Moore <rich@kde.org>
Donald Carr [Thu, 23 Feb 2012 19:33:48 +0000 (19:33 +0000)]
Remove stale QWS considerations from configure
Remove all reference to QWS/EMBEDDED in configure script
Remove legacy qws config tests
Change-Id: I09ed3d82bdda0fd0f9da87634d0cd1b7457a782b
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Oswald Buddenhagen [Fri, 24 Feb 2012 11:11:51 +0000 (12:11 +0100)]
resolve relative spec paths already on the command line
this is way more predictable than resolving it later.
Change-Id: I0ce27977b795bde9235e1d51d6f2d0d917f2398c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Thu, 23 Feb 2012 16:05:28 +0000 (17:05 +0100)]
move .qmake.cache search to Option
this is a one-time operation which depends only on the invocation, so
this new home is much more appropriate.
Change-Id: I11ef30a8227afed06e58e64e65809dba25e81567
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Wed, 22 Feb 2012 18:33:53 +0000 (19:33 +0100)]
don't look for features in PrefixPath
it's generally redundant with DataPath which we already look into.
this is consistent with where mkspecs are looked for.
i don't think anyone will notice this "loss" ...
Change-Id: Iab7c35cc22ba53e1005f26b5d85d41cf4dafad07
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Fri, 3 Feb 2012 17:28:54 +0000 (18:28 +0100)]
scope context saving more minimally
no point in saving the context when we are not actually modifying the
current context.
Change-Id: Id6f51a163e86bdf402aa0713737b655db68e7ee8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Debao Zhang [Sat, 25 Feb 2012 02:11:16 +0000 (18:11 -0800)]
Fix QSettings autotest fails under Windows
The Windows registry and INI files use case-insensitive key.
This is a side effect of
1d01bc1e83560cb2fc4f9f7f00762ffa5134448a
Task-number: QTBUG-24145
Change-Id: I862bddae68ef27569e6ffa901f98ca107d3f300b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Friedemann Kleint [Mon, 27 Feb 2012 16:09:43 +0000 (17:09 +0100)]
QComboBox: Use platform theme hint to determine popup geometry.
Change-Id: I1f81be1394455715c5dfcd2d426758c4c7cd91fc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Mark Brand [Tue, 14 Feb 2012 21:26:43 +0000 (22:26 +0100)]
QSqlTableModel: unify code for cache-clearing before select
The code in submitAll() had the same goal as the code in select,
so it has been unified. The new code in select() avoids sending lots
of dataChanged() signals for rows that are going to be removed
by QSqlQueryModel anyway.
Change-Id: Ic22e038223720185e47ed0cc573147745ecc8fc9
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Rohan McGovern [Tue, 28 Feb 2012 05:16:09 +0000 (15:16 +1000)]
configure: fixed stray output from endian.test when not verbose
The output of building and running config.tests are generally silent
unless -verbose is passed to configure.
However, there was one place in endian.test where a check for $VERBOSE
was missed, leading to confusing output like:
Creating qmake. Please wait...
rm -f endiantest.o
rm -f *~ core *.core
rm -f endiantest
rm -f Makefile
rm -f endiantest.o
rm -f *~ core *.core
rm -f endiantest
rm -f Makefile
Change-Id: Idabe85f2b188ed9da713392d116d4d2853be2189
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Mark Brand [Wed, 15 Feb 2012 14:02:05 +0000 (15:02 +0100)]
QSqlTableModel::isDirty(): simplify and improve logic
Change-Id: Ic1332befa9078a94f872e38ff779e5b4cec7c100
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Mark Brand [Thu, 16 Feb 2012 12:25:41 +0000 (13:25 +0100)]
restore previously non-working disabled test
Change-Id: I419863a681f7be96cb855a274c68eaea25efebcb
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Jason McDonald [Mon, 27 Feb 2012 06:31:03 +0000 (16:31 +1000)]
testlib: Improve the silent logging mode
Previously the silent logging mode suppressed passes, skips and internal
testlib info messages, but did not suppress debugging output, making it
hard to see the fails in a noisy test. This commit changes silent mode
so that it suppresses all output except test failures and fatal errors,
making silent mode truly useful for seeing just the important test
output.
This commit also adds a selftest to verify the behaviour of silent mode.
Change-Id: I75420aead03682306210746a87e2a3b608b58fc6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Mon, 27 Feb 2012 04:01:47 +0000 (14:01 +1000)]
testlib: Remove commented-out code from plain text logger.
Change-Id: Ica2e294d1f08cac4697d037dbc2803012e0ba58a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jan-Arve Saether [Thu, 23 Feb 2012 22:09:06 +0000 (23:09 +0100)]
Make accessible interfaces private for Qt 5.0
Since we're not yet confident if they serve their purpose well enough,
we have decided to make them internal so that we are free to tune them
later
Change-Id: Id79d154e0537aca07303afea5d057cfcb0773384
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Jiang Jiang [Mon, 27 Feb 2012 08:51:46 +0000 (09:51 +0100)]
Fix divide by zero when glyphWidth is 0
Change-Id: Ic0108b76b8d73cc977f8d64e036a65cb93db4684
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Marc Mutz [Thu, 23 Feb 2012 21:40:01 +0000 (22:40 +0100)]
QFontMetrics: make conversion from QFont to QFontMetrics explicit
There is no user of this in qtbase, and I don't think
this is a desireable feature anyway.
Change-Id: Ifebba5872b0eadb0daba3c3cd5f8b19abeed5c12
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Sean Harmer [Sat, 18 Feb 2012 20:05:53 +0000 (20:05 +0000)]
Prevent stack corruption when using OpenGL Core Profile
When an OpenGL Core Profile context is requested the function
glGetStringi() is used to query the supported extensions as
glGetString(GL_EXTENSIONS) has been removed in the core profile.
The signature for glGetStringi used in Qt missed off the APIENTRY calling
convention. This results in stack corruption on windows each time
glGetStringi() is called leading to a crash.
Change-Id: Iff62c42e2bb5fc4a5c0561fae97ddc5a8ae3a45e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Holger Hans Peter Freyther [Sat, 25 Feb 2012 11:12:09 +0000 (12:12 +0100)]
directfb: Switch to the new style plugins
The plugin might advertize more keys than supported at runtime. E.g.
the directfbegl key might not be available. I would like to have a
directfb.json.in and then generate the right file or if moc would
pre-process the file...
Change-Id: Ia8ad4e1367c06f5e35d02822d4f830ce1e9dc577
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Matthew Vogt [Fri, 24 Feb 2012 00:51:42 +0000 (10:51 +1000)]
Remove Q_DECLARATIVE_EXPORT and Q_QTQUICK1_EXPORT
Theses definitions are no longer required in qtbase.
Task-number: QTBUG-23737
Change-Id: Ib11e5840086b44120adabe83a1b068c991920f2f
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 11:28:13 +0000 (12:28 +0100)]
Add SHA-224, SHA-256, SHA-384, and SHA-512 support to QCryptographicHash
This adds Sha224, Sha256, Sha384, and Sha512 enum values to
QCryptographicHash::Algorithm. The implementation comes from RFC 6234,
http://tools.ietf.org/html/rfc6234, which is added to
src/3rdparty/rfc6234. Only the headers and SHA-2 code is included in
src/3rdparty/rfc6234 (the SHA1, HMAC, and HKDF code is not included).
Change-Id: I85139fd118291f15efc22899a5ddd1cc83810cfb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Olivier Goffart [Sun, 26 Feb 2012 09:56:49 +0000 (10:56 +0100)]
Remove use of deprecated conversion from QKeySequence
Note: UNICODE_ACCEL is Qt3 compatibility and is equal to 0
Change-Id: I808a66772abceb3822d515d69386728264eb1b40
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thorbjørn Lund Martsum [Thu, 23 Feb 2012 07:24:21 +0000 (08:24 +0100)]
QHeaderView - minor cleanup in viewportEvent
This is an improvement to a previous fix with
SHA
e62e71162606fec134600955a89b7e0c34a7840b
We actually never want to call resizeSections if the parent is hidden.
Therefore we can both simplify and improve the code with this patch.
When we do show/hide on parent then the visible status is updated
before we get into this code. I have verified the patch on the code
from:
Task-number: QTBUG-14234
Change-Id: If7bfa3b3813c97b4a545e48423526e9cfe118de4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Olivier Goffart [Mon, 27 Feb 2012 11:00:07 +0000 (12:00 +0100)]
Detect QMetaType::QReal from the definition of qreal
Instead of relying to complex preprocessor expression that need to be
maintained to be kept the same as in qglobal.h
This aslo fix the case where QT_COORD_TYPE is defined (It is meant to be
defined to float or double, any other type would not make sense)
So now there should hopefully be only one place to change if one need to
adjust the type of qreal
Change-Id: I778312112603173562dbe675ab491b53d6cd2174
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Miikka Heikkinen [Mon, 27 Feb 2012 11:54:21 +0000 (13:54 +0200)]
Fix submenu positioning
Submenus are now positioned to the correct side of the parent menu
based on layout direction, if there is enough space on screen to fit
the menu. If there is insufficient space, then the menu is positioned
to the other side of the parent menu. In case that also causes submenu
to be partially ofscreen (very wide menu relative to the screen),
then the submenu will be aligned with the screen edge and will overlap
the parent menu. This seems like a lesser evil compared to having
submenu partially offscreen, which could obscure important details
such as checkmarks.
Task-number: QTBUG-23568
Change-Id: I6a9ab2c232713a2ee5a6dde3227c40419d46bd3d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Bradley T. Hughes [Mon, 27 Feb 2012 10:21:10 +0000 (11:21 +0100)]
Make configure.exe only detect each compiler once
After commit
e0acf6504356f14a6352b16ffed7b59453914863, configure.exe
built with the x64 compiler could detect the same compiler twice,
breaking the -platform detection even when only one compiler is in the
path. Fix this by taking advantage of the CompilerInfo struct ordering
and ignore detection of the same compiler.
Change-Id: I583230520d2e0859196f9d7c8af31adbb981a6ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Oswald Buddenhagen [Thu, 23 Feb 2012 14:26:56 +0000 (15:26 +0100)]
remove useless init() function
it did the same cleanup() did, and they are always called consecutively
anyway (except at start and end where it does not matter).
Change-Id: I4c82024d19d6c670f1f4037d43147a15680614ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Thu, 23 Feb 2012 14:39:23 +0000 (15:39 +0100)]
move resetEnvironment() call to cleanup()
we want to call it even if the test fails
Change-Id: Ie8f3f9d2df5d52990d6b9f9a632e49826278175a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Thu, 23 Feb 2012 14:38:30 +0000 (15:38 +0100)]
make qmake test suite a tad more verbose on failure
automatically dump the collected output on non-expected return code
Change-Id: Ifda7287869f329c5a6714e6f21aa9c3991e9ee4e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Thu, 23 Feb 2012 14:35:04 +0000 (15:35 +0100)]
TestCompiler: split commands from arguments
this allows us to temporarily set some extra args without (incorrectly)
instantiating a second TestCompiler (and on the way relying on $PATH for
finding qmake).
Change-Id: Icce5bf7314148ddbe705606f77a26e3362b31f67
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Thu, 23 Feb 2012 13:46:08 +0000 (14:46 +0100)]
don't rely on $PATH for finding rcc
Change-Id: I7e6ffad6d84cca0b548920b3e620375fb5e314e9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Tue, 21 Feb 2012 20:41:28 +0000 (21:41 +0100)]
remove over-uses of $$list()
not sure why anyone would do *that* ...
Change-Id: Id91e9e8bd602a9d9275ade2ca86aaa4f4698ff72
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Tue, 21 Feb 2012 20:30:57 +0000 (21:30 +0100)]
avoid using infile() needlessly
it's rather pointless to first query the variable's presence in the
file. instead, just fetch it and see what is in there.
for this to work cleanly we defer the concatenation of the filename.
Change-Id: I322db8ae897272fae049074d8b7676787286aedd
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Debao Zhang [Fri, 24 Feb 2012 21:46:33 +0000 (13:46 -0800)]
Fix tst_qmenu.
Clear away Q_WS_WIN/Q_WS_X11 from QMenu. Using the hint returned by the
QPlatformTheme.
Task-number: QTBUG-24325
Change-Id: Iaa4da26c74273d7cfc1fbec6519c52d09e10f7bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Debao Zhang [Fri, 24 Feb 2012 18:51:18 +0000 (10:51 -0800)]
QClipboard: Fix autotest fails
tst_qclipboard.cpp still has Q_WS_WIN which must be clear away. After
clean up, auto test will fail under windows: When setMimeData() is
called, dataChanged() signal will be emited twice.
The solution for QTBUG-24184 has partially solved the problem, but it
still there. Make sure emitChanged() only called by QPlatformClipboard
will give our more control for this.
Task-number: QTBUG-24484
Change-Id: I23566c6d3b32828b6865234c311af3635fe9e299
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Oswald Buddenhagen [Fri, 24 Feb 2012 08:10:52 +0000 (09:10 +0100)]
don't generate bogus TARGETs
Change-Id: Ia99cd8862157e5630506d02b3c7e9b35d4bc3302
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Oswald Buddenhagen [Fri, 24 Feb 2012 18:08:13 +0000 (19:08 +0100)]
bump version of QMAKE_TARGET_PRODUCT
... whatever that may be good for
Change-Id: I06695a06aae52386236a7a31fe7865cc8389d3b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Friedemann Kleint [Mon, 27 Feb 2012 10:09:27 +0000 (11:09 +0100)]
Fix QThreadstorage test.
- Create subdirectories containing profiles to avoid
problems with -fast.
- Use QFINDTESTDATA to locate binary.
- Make it a console application, no Mac-bundle.
- Add error messages to the test, give it a longer time-out
and ensure sub-process is killed if it hangs.
Change-Id: Ibc177b786c4bc8fdbc068a8c45f4801a41c9f660
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Friedemann Kleint [Mon, 27 Feb 2012 11:38:04 +0000 (12:38 +0100)]
Fix icon loading in style sheets.
QIcon was moved to QtWidgets, while the parser is still in QtGui.
Introduce a QCss::IconValue struct that contains the icon data
and convert to QIcon in widgets.
Change-Id: I09ac8a12a4b02bdca91ee2e8fcc28c86b5a001e7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Olivier Goffart [Sat, 25 Feb 2012 16:00:15 +0000 (17:00 +0100)]
Move the QString comparison operator as non member function
The operator== and similar should not be member of the class. This
ensure a symertry.
Indeed, consider this code
string == string1 + string2;
string1 + string2 == string;
The first line compile fine even if QStringBuilder is used, because
QStringBuilder will be converted to QString implicitly.
But the second line do not compile if the operator== is a member of
QString, because the implicit conversion rules do not apply.
For this reason, the symetric operators should not be declared as
member.
Change-Id: I3f7c11fab45a9133f7a424bdfcb894f97da9282b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
David Faure [Fri, 24 Feb 2012 14:17:23 +0000 (15:17 +0100)]
QtTest: add missing \since 5.0 to the new macros
Change-Id: I8f7060c41df1e0bf1a8c35930400a31a4239a3d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
David Faure [Sun, 26 Feb 2012 09:51:52 +0000 (10:51 +0100)]
Fix inconsistent auto test executable names
Change-Id: I3b6b5b37e32be25d1b9933395c43f6d5aa5b8810
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Giuseppe D'Angelo [Sun, 26 Feb 2012 01:45:53 +0000 (01:45 +0000)]
QRegExp: fix crash
Fixes a crash when invoking various QRegExp methods on an object
*before* doing any match. For instance fixes:
QRegExp re;
re.matchedLength(); // crash
Task-number: QTBUG-23352
Change-Id: I9c239ff790a139c7820ef1aeced89d31320ae6b0
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Oswald Buddenhagen [Fri, 24 Feb 2012 21:12:18 +0000 (22:12 +0100)]
remove library version matching from qt.conf
this feature was introduced in feb 2005 by Sam with this comment:
> I have implemented a versioning into the keys and do environment
> expansion there as well, these aren't immediately usefull but Marius
> and I agreed that distributors will probably want such features at
> times. The versioning fallbacks will be usefull to us over time no
> doubt.
imo the versioning is a contestant for the most useless feature ever:
- (linux) distributors couldn't care less - they simply configure qtcore
correctly. additionally, the packaging policies state that no config
files should live in the binary dir at all, so no qt.conf for them.
- ISVs don't care, because they ship their software with a particular qt
version anyway.
- SDK distributors don't care, because it doesn't solve any real problem
for them: a) they will isolate the (qmake) versions and b) a
distinction based on version number (as opposed to build
configuration) is utterly useless in the first place.
i left in the variable expansion, as it could at least theoretically be
useful for creating relocatable packages. debatable - the file it easy
enough to modify at installation time.
Change-Id: Ida8a50b16d55d8d8613d1a98a51df56753f6a6e3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Friedemann Kleint [Thu, 23 Feb 2012 11:26:10 +0000 (12:26 +0100)]
Use new plugin system in qtbase.
- AccessibleWidgets
- Windows printer support
- Examples
Change-Id: Icc162bd7fc284b3c76d9966210f983728085c743
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Jędrzej Nowacki [Fri, 24 Feb 2012 13:27:01 +0000 (14:27 +0100)]
Simplify QMetaTypeSwitcher.
We do not need to distinguish between different types in the switcher.
Before this patch it was not possible to overload
DelegateObject::delegate with a pointer type. Now it is fixed.
Change-Id: Icd73a53e73e5e66b1b6f6407ba4e0f79e584d930
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Stephen Kelly [Thu, 23 Feb 2012 11:59:21 +0000 (12:59 +0100)]
Optimize space for the QEventLoopQuitLocker.
Use a union and a type enum instead of three pointers.
Change-Id: I02b11733a4f2e95099064fa9325497d4e04ac615
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Jędrzej Nowacki [Fri, 10 Feb 2012 08:14:41 +0000 (09:14 +0100)]
Reduce QtCore lib binary size by around ~3KB, by removing template code
Reusing a template is much better then creating a new one, even if it
should inline the same code.
For some reason replacing T* by void* force gcc to remove a few bytes
per template instantiation too, it is not really significant, but it
alows us to simplify the code.
Benchmarks don't show any regressions.
Change-Id: I4fdf1e4dc311b23021eb5758605602937d05b183
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Olivier Goffart [Sat, 25 Feb 2012 16:54:00 +0000 (17:54 +0100)]
Fix selftests while using QStringBuilder
Change-Id: I6dcd830b96023765447c9683fd95209d4312fb1b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Olivier Goffart [Sat, 25 Feb 2012 10:42:57 +0000 (11:42 +0100)]
Remove deprecated usage of QKeySequence from qguivariant
The implicit conversion operators are deprecated.
Change-Id: I0e94c0671413da1ab58c6c7b8bb31614e2696409
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Olivier Goffart [Sat, 25 Feb 2012 20:27:03 +0000 (21:27 +0100)]
Remove usage of deprecated QAbstractItemModel::setRoleNames
Change-Id: If41bf0d6d50969156269c67a15e006d38edc8e1f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Olivier Goffart [Sun, 26 Feb 2012 09:54:07 +0000 (10:54 +0100)]
Don't use deprecated QAbstractItemModel::reset()
Change-Id: Idf9971668a372a12ba319d954c35e157d8a08bd1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Jędrzej Nowacki [Fri, 10 Feb 2012 11:21:25 +0000 (12:21 +0100)]
Cleanup usage of QVariant::Type.
QVariant::Type is marked as obsolete. It is not possible to get rid of
it completely, in a source compatible way, but at least we can remove it
safely from a method arguments list.
Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Wed, 22 Feb 2012 13:49:13 +0000 (14:49 +0100)]
Remove more support for unsupported GCC versions.
Change-Id: I827c9f982a7d7d20913b99c8fdaf98437a0a73db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Olivier Goffart [Sat, 25 Feb 2012 12:56:11 +0000 (13:56 +0100)]
QTestlib: no need to use the preprocessor to distinguish qreal
The code paths are actually the same, so merge them.
Change-Id: I456b8a9a825cccdd80cd6a52a0a6737cde252363
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Marc Mutz [Sun, 26 Feb 2012 10:53:56 +0000 (11:53 +0100)]
QFontEngine: remove unused and buggy grayPalette()
QFontEngine::grayPalette() mistakenly returns an
empty vector, so even if there's a user (the class
it exported, after all), it cannot correctly use it.
So, just remove it.
Change-Id: Id5f70139e5f6ed9a2a3f28400cd0750d14cb7dc0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Toby Tomkins [Mon, 27 Feb 2012 03:26:56 +0000 (13:26 +1000)]
Skip unstable qlineedit autotest on Ubuntu 11.10.
Task-number: QTBUG-24518
Change-Id: Ia271a820613c1f8a885779eddd20e261716afc6d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Toby Tomkins [Fri, 24 Feb 2012 07:16:32 +0000 (17:16 +1000)]
qfiledialog2: Skip test that is passing on CI and failing otherwise.
Task-number: QTBUG-23602
Change-Id: Id5dfb85956048c60849d865161212b0764e8f250
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Kurt Korbatits [Tue, 21 Feb 2012 03:54:11 +0000 (13:54 +1000)]
Changed qnetworkreply unittest to return correct code
- Changed waitForFinished() to return correct return code
Change-Id: Ic6b0dfa195254783a2106011c4a108d907d73557
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Matthew Vogt [Thu, 23 Feb 2012 01:31:05 +0000 (11:31 +1000)]
Add workaround for projects using 'QT += declarative'
The code previously exported by the declarative library has been
migrated to the qml and quick libraries, and the symbol names have been
changed accordingly. To allow existing projects to continue to build,
the declarative module now contains a set of definitions redefining the
deprecated class names to their replacement names.
To make this work, a dependency on the declarative module now
automatically adds a dependency on the qml module in order to make the
new library available for linking.
This is a temporary change to prevent breaking existing projects
that depend on the declarative module. After clients have had an
opportunity to update their code to the use the new interfaces,
it can be removed.
Task-number: QTBUG-23737
Change-Id: Idee6ac627858856802bb1be29e9a4a079da73688
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Matthew Vogt [Thu, 23 Feb 2012 01:12:58 +0000 (11:12 +1000)]
Allow moc to handle symbols that have been redefined.
Allow moc to produce the desired identifiers when used with C++
symbol names that have been redefined, for example by -Dfoo=bar.
Two changes are required: firstly, when encoding a type name, the
components of the name must be checked for substitutions that have been
defined for that token (note that this is not done here by correct
pre-processing, but only by processing the resultant table of
definitions). Secondly, the arguments to the SIGNAL, SLOT and METHOD
macros must be allowed to be substituted during macro expansion rather
than stringized directly.
This is a temporary change to prevent breaking existing projects
that depend on the declarative module. After clients have had an
opportunity to update their code to the use the new interfaces,
it can be removed.
Task-number: QTBUG-23737
Change-Id: I39e6844cebf6ca7984af6028160b8a3797ac44a5
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Marc Mutz [Fri, 24 Feb 2012 16:33:25 +0000 (17:33 +0100)]
QFlags<>: let the compiler generate copy ctor/op=
The user-defined copy constructor and
copy-assignment operators were 100% equivalent
to the ones the compiler would generate, so
let the compiler generate them (so we reap
move constructors, too, even though they're
not needed on this class).
Change-Id: Iecdd579fa5a819d083ec9b2f25734ddba85515e6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Oswald Buddenhagen [Thu, 2 Feb 2012 17:11:16 +0000 (18:11 +0100)]
remove fallback re-initialization of TARGET after parsing project
we already initialize it before parsing a project. if a project is daft
enough to clear TARGET, it does not deserve differently than breaking.
Change-Id: I6c727bc27d72a00e84b676ae3c169024bdb2d929
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Olivier Goffart [Sat, 25 Feb 2012 09:39:34 +0000 (10:39 +0100)]
RemoveRef should not remove the const
This does not fix anything, because AreArgumentsCompatible already
do all the type checks.
But it make RemoveRef consistant with std::remove_reference
Change-Id: Ic42c872356172d7f5ea10de050254b5d10e50a6e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Wed, 22 Feb 2012 14:27:40 +0000 (15:27 +0100)]
QFixed: make constexpr
Make most QFixed{,Size,Point} members constexpr.
See
f3141c58badbd2da9eb42021e9704742c3e52a9b for rationale.
Change-Id: I0b44f59bb768e1f79c57e1c9a0dc67afb515e03f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Marc Mutz [Wed, 22 Feb 2012 14:18:27 +0000 (15:18 +0100)]
QFixed{,Size}: reformulate some functions in a constexpr-friendly way
The main change is the addition of a new constructor
that passes its argument into 'val' verbatim. In order
to disambiguate it from the existing QFixed(int)
constructor, it takes a second 'int' argument. This
is too ugly for public API, so it's private, and only
used by static QFixed fromFixed(int), which is the
existing named constructor with the same semantics.
The rest of the changes simply reformulate their
operations in terms of fromFixed().
This makes them ready to be constexpr'ed.
Change-Id: I2a3813d62bd4124064755de6b00526a60fc82c1d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Giuseppe D'Angelo [Sun, 26 Feb 2012 03:11:19 +0000 (03:11 +0000)]
uic: remove unused QRegExp #includes
QRegExp is not used, so they're unnecessary.
Change-Id: I3480bcbe013a0bf15e2ee4fa30862fe035820eea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Tue, 21 Feb 2012 12:41:53 +0000 (13:41 +0100)]
QPrinterInfo: remove unused variable
Change-Id: I1a3db07e7fe25066a6b13ca41854566ccb1298df
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Olivier Goffart [Sun, 26 Feb 2012 10:00:44 +0000 (11:00 +0100)]
Remove usage of deprecated QRect::unite
Change-Id: I1920da995fde6ff2a8b2e3facddeee6e3c17b44c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>