Commit Graph

4893 Commits

Author SHA1 Message Date
Oswald Buddenhagen
494ed1d536 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>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
0957085f3d 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>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
fd1d98b6af 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>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
edde615209 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>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
091dd54a6c don't rely on $PATH for finding rcc
Change-Id: I7e6ffad6d84cca0b548920b3e620375fb5e314e9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
5bbfe4d6d8 remove over-uses of $$list()
not sure why anyone would do *that* ...

Change-Id: Id91e9e8bd602a9d9275ade2ca86aaa4f4698ff72
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
f4f97555a2 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>
2012-02-27 20:52:45 +01:00
Debao Zhang
446d63be1b 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>
2012-02-27 20:52:45 +01:00
Debao Zhang
63017136a1 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>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
e76d72aec5 don't generate bogus TARGETs
Change-Id: Ia99cd8862157e5630506d02b3c7e9b35d4bc3302
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
a62dfb7a72 bump version of QMAKE_TARGET_PRODUCT
... whatever that may be good for

Change-Id: I06695a06aae52386236a7a31fe7865cc8389d3b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-27 20:52:45 +01:00
Friedemann Kleint
ed8d8451c4 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>
2012-02-27 18:33:50 +01:00
Friedemann Kleint
5a0eb4e768 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>
2012-02-27 18:30:38 +01:00
David Faure
3d3b3de83a QtTest: add missing \since 5.0 to the new macros
Change-Id: I8f7060c41df1e0bf1a8c35930400a31a4239a3d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-27 13:55:21 +01:00
David Faure
7a4b6f8cdd 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>
2012-02-27 13:55:12 +01:00
Giuseppe D'Angelo
136c2bf184 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>
2012-02-27 13:54:24 +01:00
Oswald Buddenhagen
568e714fdf 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>
2012-02-27 13:51:04 +01:00
Friedemann Kleint
efde205586 Use new plugin system in qtbase.
- AccessibleWidgets
- Windows printer support
- Examples

Change-Id: Icc162bd7fc284b3c76d9966210f983728085c743
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-27 13:28:21 +01:00
Jędrzej Nowacki
6df396286a 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>
2012-02-27 13:19:00 +01:00
Stephen Kelly
184c9e346e 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>
2012-02-27 12:57:30 +01:00
Jędrzej Nowacki
beab403d9f 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>
2012-02-27 12:57:02 +01:00
Olivier Goffart
df055acc81 Fix selftests while using QStringBuilder
Change-Id: I6dcd830b96023765447c9683fd95209d4312fb1b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-27 12:49:38 +01:00
Olivier Goffart
ec739707d7 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>
2012-02-27 12:49:33 +01:00
Olivier Goffart
96cfca6151 Remove usage of deprecated QAbstractItemModel::setRoleNames
Change-Id: If41bf0d6d50969156269c67a15e006d38edc8e1f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-27 12:48:57 +01:00
Olivier Goffart
b58631ce47 Don't use deprecated QAbstractItemModel::reset()
Change-Id: Idf9971668a372a12ba319d954c35e157d8a08bd1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-27 12:48:48 +01:00
Jędrzej Nowacki
51f2a0c331 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>
2012-02-27 12:47:52 +01:00
Stephen Kelly
1a49a529ee Remove more support for unsupported GCC versions.
Change-Id: I827c9f982a7d7d20913b99c8fdaf98437a0a73db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-27 12:45:31 +01:00
Toby Tomkins
472b06d63a 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>
2012-02-27 09:10:25 +01:00
Toby Tomkins
35ef771d5a 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>
2012-02-27 08:08:50 +01:00
Kurt Korbatits
efb5a3a52e 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>
2012-02-27 04:19:28 +01:00
Marc Mutz
2a771cef4a 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>
2012-02-26 23:43:10 +01:00
Oswald Buddenhagen
e34ee31270 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>
2012-02-26 13:23:49 +01:00
Olivier Goffart
3688fac040 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>
2012-02-26 13:23:49 +01:00
Marc Mutz
5f65d8ea25 QFixed: make constexpr
Make most QFixed{,Size,Point} members constexpr.
See f3141c58ba for rationale.

Change-Id: I0b44f59bb768e1f79c57e1c9a0dc67afb515e03f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-26 13:23:49 +01:00
Marc Mutz
3e4a3bafb6 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>
2012-02-26 13:23:49 +01:00
Giuseppe D'Angelo
47525e6896 uic: remove unused QRegExp #includes
QRegExp is not used, so they're unnecessary.

Change-Id: I3480bcbe013a0bf15e2ee4fa30862fe035820eea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-26 11:58:25 +01:00
Marc Mutz
7679fcfeb5 QPrinterInfo: remove unused variable
Change-Id: I1a3db07e7fe25066a6b13ca41854566ccb1298df
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-26 11:58:16 +01:00
Olivier Goffart
5cc1a87250 Remove usage of deprecated QRect::unite
Change-Id: I1920da995fde6ff2a8b2e3facddeee6e3c17b44c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-26 11:39:40 +01:00
ABBAPOH
4f4491e0b6 Fix doc according to current method signature
Change-Id: I23d0f7a88f4c092c1e7cd2742fdf6e6f68ad485a
Reviewed-by: David Faure <faure@kde.org>
2012-02-26 10:40:14 +01:00
Olivier Goffart
ffa072655d Fix compilation of examples with QStringBuilder
In sub-attack an interview, one can't make two implicit conversions at
once, so explicitly convert to the right type.

The change in the torrent example is required because of
https://codereview.qt-project.org/16168 (commit 9491272)
But in that case, using a QByteArray is better anyway.

Change-Id: Ieed22ac7f0d700d5ba5d1e70af3db4dd6c139c8f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-25 21:30:45 +01:00
Marc Mutz
d91add71e7 QSslError: fix wrong #endif placement
This would break a namespaced Qt when QT_NO_DEBUG_STREAM
was in effect. Unlikely to hit, but nevertheless fixworthy.

Change-Id: Ie2a4cf4334a6a610c84233ab1ca89b928386c91a
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-02-25 15:28:11 +01:00
Jonathan Liu
bc8bc6018e Fix MinGW configure bootstrap
Makefile.mingw was using the test command which requires sh.exe. This
adds support for bootstrap using cmd.exe instead.

Change-Id: Ieb67843170d2745ce119cc8feaa5433aa82fd7d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-25 15:28:11 +01:00
Oswald Buddenhagen
f5a03eec2d process variable assignments with tabs as well
Change-Id: If3caa4094aa9d8caefc9829bfea44426d59477d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-25 15:28:11 +01:00
Shane Kearns
e0acf65043 configure - fix detection of MSVC compiler in x64
x86 processes get redirected to the 32 bit area of the registry,
while 64 bit processes access the registry in raw form.
Added the registry paths for 64 bit processes to see the 32 bit
registry keys for MS visual studio. (Wow6432Node)

This problem was revealed when we stopped including configure.exe
as a binary checkin to git. Running configure in an x64 compiler
environment results in creating an x64 configure.exe

Change-Id: I5e3e51ddbf20ccc65abf1833bf23ee5670bd973e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-25 14:04:22 +01:00
Friedemann Kleint
1118f28b86 Fix a crash in QSystemLocalePrivate::uiLanguages().
Use the correct calling convention. Discovered by the mimetype
test in Qt 5.

Change-Id: I79b97325dd69466885a64c238935107bf14e9a0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
(cherry picked from commit bc6e35d94325f4b18caec7ce0824c5beab95cdd7)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-25 14:04:22 +01:00
Olivier Goffart
71660ee565 Fix compilation without QT_DEPRECATED_SINCE
QAbstractItemModel::reset() is deprecated

Change-Id: I2d9aa9fade1660df14945ca11123341fce504050
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-25 12:37:53 +01:00
Teemu Katajisto
e430ddfafc Implement isSharing() and isValid() methods for QCocoaGLContext
Shared resources may have been used when initializing NSOpenGLContext
but QCocoaGLContext did not implement isSharing(). This caused
default implementation to return false always and therefore shared
resource test case failed.

Implemented also another missing method, isValid().

Task-number: QTBUG-23061

Change-Id: Ia912450035b584ea90a02a7d88d6ae531c3cbadf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-02-25 11:43:35 +01:00
Marc Mutz
6ee0135e9d QFutureWatcher: Make constructors explicit
Change-Id: I363665725869993b10985004c1c6441ded435dbc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-25 11:43:18 +01:00
jian liang
bf66eebbc2 Fix to exit of adopted thread watcher in Windows
Don't register the thread handle and QThread object pointer to watch list
for adopted thread watcher thread in Windows. Otherwise the watcher thread
will never exit and can't clean up its own QThreadData and QAdoptedThread
object.

Task-number: QTBUG-23961

Change-Id: Ia84326cf3cfd978d2b003ccc1bb6861db950e899
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-25 08:23:51 +01:00
Marc Mutz
77772f21de compile fix: parse under C++11
See d94ab97b77 for details.

Change-Id: Ifc015be6575bd8f469f257d71fbbf79e07226729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-02-24 22:39:59 +01:00