profile/ivi/qtbase.git
11 years agoSpeed up tst_QGraphicsView::mapToScene test
Thiago Macieira [Sun, 12 Aug 2012 22:24:27 +0000 (00:24 +0200)]
Speed up tst_QGraphicsView::mapToScene test

This test is doing a brute-force mapping. Coupled with changes to
QCOMPARE last year, this now allocates and deallocates a lot of memory
per iteration. On my Sandybridge, it takes two minutes to run:

     111136.781153 task-clock                #    0.999 CPUs utilized
   371,692,633,238 cycles                    #    3.344 GHz
   182,641,818,708 stalled-cycles-frontend   #   49.14% frontend cycles idle
    57,951,552,830 stalled-cycles-backend    #   15.59% backend  cycles idle
   477,216,332,971 instructions              #    1.28  insns per cycle
                                             #    0.38  stalled cycles per insn
    86,959,637,669 branches                  #  782.456 M/sec
       309,185,237 branch-misses             #    0.36% of all branches

     111.264868818 seconds time elapsed

Changing the iteration step from 1 to 5 reduces the runtime to about 5
seconds.

Change-Id: I9cad6f85f535f472319da7cd6c4aa28e12ddf1b7
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoUse POSITION_INDEPENDENT_CODE for these tests.
Stephen Kelly [Fri, 10 Aug 2012 09:14:10 +0000 (11:14 +0200)]
Use POSITION_INDEPENDENT_CODE for these tests.

These projects are expected to fail, but we need to make sure they fail
for the right reason.

Change-Id: I8a7caaa663060712c5c7113ef3b054feba2e2287
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agoAdd hints for where to find packages for projects expected to fail.
Stephen Kelly [Fri, 10 Aug 2012 09:13:02 +0000 (11:13 +0200)]
Add hints for where to find packages for projects expected to fail.

In the CI system, an environment variable is used to convey
the CMAKE_PREFIX_PATH, but that can not be relied upon.

Change-Id: Ie4fbacaac6ae18f95a3b4d1e796a4b4c91a418c4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agoAdd the minimum CMake version to projects built standalone.
Stephen Kelly [Fri, 10 Aug 2012 09:12:15 +0000 (11:12 +0200)]
Add the minimum CMake version to projects built standalone.

Change-Id: If9d2a464d94faee0dccd77bc54946d91dd117db3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agotst_qgraphicsview: increase test timeout further
Rohan McGovern [Mon, 13 Aug 2012 00:28:35 +0000 (10:28 +1000)]
tst_qgraphicsview: increase test timeout further

This test has recently timed out in CI, but appeared to be making
progress. Give it more time to complete.

Change-Id: Ied0fb7aad35ed6d5889dd585a7545687617e5e19
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
11 years agoQImage{Reader,Writer}: remove unused local typedef (GCC 4.8 warning)
Marc Mutz [Fri, 10 Aug 2012 22:03:24 +0000 (00:03 +0200)]
QImage{Reader,Writer}: remove unused local typedef (GCC 4.8 warning)

GCC 4.8 warns:

  warning: typedef ‘PluginKeyMapConstIterator’ locally defined but not used [-Wunused-local-typedefs]

Change-Id: I0225708b590ac3d72ab3cb8f61e686091c187053
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQModelIndex: remove user-defined copy operations
Marc Mutz [Fri, 24 Feb 2012 16:15:25 +0000 (17:15 +0100)]
QModelIndex: remove user-defined copy operations

They're identical to the ones the compiler will
synthesize and their presence prevents move
constructor and assignment operators from being
synthesized alongside their copy counterparts.

The destructor can go, too.

Change-Id: Ia9cc26ba1ffaa670f03642af457e632f44bd69c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agosupport -rpath for modules which are not installed to QT_INSTALL_PREFIX
Oswald Buddenhagen [Thu, 9 Aug 2012 13:02:44 +0000 (15:02 +0200)]
support -rpath for modules which are not installed to QT_INSTALL_PREFIX

a module's project file may set MODULE_INSTALL_LIBS before loading
qt_module.prf to have an alternative RPATH linked into the users of that
module.
this is relevant only for linking against non-installed -prefix builds
of that module, as otherwise .libs from the module's pri file is used
for rpath.

Change-Id: Ib240e748cf130a71a5991dc643c368a983092ead
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agofix -rpath-link handling for non-installed prefix builds
Oswald Buddenhagen [Wed, 8 Aug 2012 19:38:35 +0000 (21:38 +0200)]
fix -rpath-link handling for non-installed prefix builds

forwarding module pris get rpath_link{,_private} fields, which are
used accordingly by qtAddModule().

Change-Id: I0abc2dc8b1e8744dbf7f439aa7fed9ae159c2c74
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoFix order of namespace/include guards.
Frederik Gladhorn [Fri, 10 Aug 2012 16:33:07 +0000 (18:33 +0200)]
Fix order of namespace/include guards.

Change-Id: I9ed1e82c90e38a65c15bb9d05ff789270218d4b5
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
11 years agoqtAddModule(): put search paths directly into LIBS{,_PRIVATE}
Oswald Buddenhagen [Wed, 8 Aug 2012 07:56:39 +0000 (09:56 +0200)]
qtAddModule(): put search paths directly into LIBS{,_PRIVATE}

QMAKE_LIBDIR and QMAKE_FRAMEWORKPATH have the downside that they
always effectively end up in LIBS, which makes for weird prl files.

Change-Id: Iaf61b0038504ff91ae5ec7f9b1255fe3a2d134f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoassemble the complete tool commands already in qt_tool.prf
Oswald Buddenhagen [Wed, 8 Aug 2012 09:33:26 +0000 (11:33 +0200)]
assemble the complete tool commands already in qt_tool.prf

this saves some repeated calculations. also, it's nicer to have most
logic in one place.

Change-Id: Iea362d40f5e6203709ced94d29ca61a4163b8e69
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agofix error message about bad qt modules
Oswald Buddenhagen [Wed, 8 Aug 2012 09:25:54 +0000 (11:25 +0200)]
fix error message about bad qt modules

the variable name is a function parameter now

Change-Id: I46f3ce37c157312e7f70291a0cef2d666d50664c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoFix vcproj file generation for incredibuild handling of moc etc targets
Andy Shaw [Fri, 10 Aug 2012 12:54:32 +0000 (14:54 +0200)]
Fix vcproj file generation for incredibuild handling of moc etc targets

When incredibuild-xge had been turned on by configure then it was not
ensuring that the generated vcproj files had the right extra comments
needed to make incredibuild run moc and other tools in parallel.  By
fixing the prf file to get around a problem in the parser this is now
respected.

Task-number: QTBUG-14482

Change-Id: Ifd24bde2db7d80d3a52719c733d15f228c7b3534
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoMake rowIntersectsSelection take account of the parent argument.
Stephen Kelly [Fri, 10 Aug 2012 16:30:19 +0000 (18:30 +0200)]
Make rowIntersectsSelection take account of the parent argument.

Task-number: QTBUG-22370

Change-Id: I497194793eab624b760deea93dac0df767850330
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoQtWidgets: use new qEnvironmentVariableIs{Empty,Set}()
Marc Mutz [Mon, 6 Aug 2012 22:14:45 +0000 (00:14 +0200)]
QtWidgets: use new qEnvironmentVariableIs{Empty,Set}()

Incidentally, this patch shows that Qt isn't consistent in how it
treats empty environment variables used as flags, but that is something
for a separate commit. This patch aims to be behaviour-preserving.

Change-Id: I5390cda314858762b76384291373a6f0167d323a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoTake scroll position into account when painting drag pixmap.
Stephen Kelly [Thu, 9 Aug 2012 12:49:38 +0000 (14:49 +0200)]
Take scroll position into account when painting drag pixmap.

Task-number: QTBUG-26793

Change-Id: Ic19cb6581cd5838d26713998e152772a5d12da4f
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoRevert "Added default argument for color profile to QImage constructors."
Alexandros Dermenakis [Thu, 2 Aug 2012 10:51:13 +0000 (12:51 +0200)]
Revert "Added default argument for color profile to QImage constructors."

Reverting change after request in the developers mailing list.

This reverts commit 50a5bd5429e0c8b99be81b86d3730737cb7f8514.

Change-Id: Ic4a420d6ad0995810ed61d31edd28e7b603cca5e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agomake currentText the USER property for QComboBox
Mark Brand [Wed, 18 Jul 2012 20:02:43 +0000 (22:02 +0200)]
make currentText the USER property for QComboBox

QItemDelegate takes the USER property as the value to be set using
model->setData(). The text is what is expected.

follow-up to b1b87a73012342dc1619a8e907ea9954d59ca564 which in Qt 4.8.0
broke the interaction between QComboBox and QItemDelegate used by
QDataWidgetMapper and item views.

Task-number: QTBUG-26501
Change-Id: I005a0a6af5265ee22baf417957e520992d16d6e1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoRequire CMake 2.8.9 for the qt5_use_modules function.
Stephen Kelly [Thu, 2 Aug 2012 08:07:19 +0000 (10:07 +0200)]
Require CMake 2.8.9 for the qt5_use_modules function.

The newer CMake version has the POSITION_INDEPENDENT_CODE property which is
what we need here. The CMake 2.8.8 implementation uses awkward and incomplete
string manipulation which I don't want to maintain for any amount of time
when Qt 5.0 is released.

Change-Id: If7ace9c6925ccdbf800f1863fa2368e55fa44d7f
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoDoc: Added a Qt Network landing page.
Jerome Pasion [Fri, 3 Aug 2012 15:39:21 +0000 (17:39 +0200)]
Doc: Added a Qt Network landing page.

-fixed generated HTML file names
-removed qt-network group in qt/qtdoc and removed \ingroup instances

Change-Id: Ida5ded5da30e6db1978382f6742a5da8036e055e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
11 years agoUse an include guard for qelapsedtimer.h that matches the file name
Thiago Macieira [Fri, 10 Aug 2012 09:55:50 +0000 (11:55 +0200)]
Use an include guard for qelapsedtimer.h that matches the file name

The class used to be called QTimeStamp before.

Change-Id: I6e543f4f131a80299eb5dae78d8852b7899bab8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoUse Q_LIKELY instead of doing an #ifdef for GCC
Thiago Macieira [Fri, 10 Aug 2012 09:51:42 +0000 (11:51 +0200)]
Use Q_LIKELY instead of doing an #ifdef for GCC

This code predated the Q_LIKELY macro. Now that we have it, use the
official macro.

Change-Id: I0e43609f8d6827f8fef7b928655a965cba579b8d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoCorrect QTransform::QTransform documentation re m13 initialisation.
Mitch Curtis [Fri, 10 Aug 2012 06:59:02 +0000 (08:59 +0200)]
Correct QTransform::QTransform documentation re m13 initialisation.

Documentation incorrectly states that it is m13 that is set to 1,
when it is instead m33.

Task-number: QTBUG-10232
Change-Id: If3c7d3eb1c478ebef4f13b4842235445afc48049
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
11 years agoHandle "-psn_XXX" command line args on Mac
Morten Johan Sorvig [Tue, 7 Aug 2012 12:17:27 +0000 (14:17 +0200)]
Handle "-psn_XXX" command line args on Mac

Finder on Mac OS X sends a command line argument of
the form -psn_0_3523420 when launching applications.
Eat the argument like we do in Qt 4.

Change-Id: I09db9dea035e62c0b816a833c9ad6fcd78f83735
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Simo Fält <simo.falt@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agokms: Restore VT settings when crashed
Laszlo Agocs [Tue, 31 Jul 2012 10:43:42 +0000 (13:43 +0300)]
kms: Restore VT settings when crashed

This does the job of keeping the terminal keyboard working when
the application segfaults but is somewhat unsafe because ioctl()
is not async-signal safe.

Change-Id: Ie6728a4252e18c29bba8f8308e6c00d4a1eb6a8e
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
11 years agoQtGlobal: (new) qEnvironmentVariableIs{Set,Empty}()
Marc Mutz [Fri, 3 Aug 2012 10:46:15 +0000 (12:46 +0200)]
QtGlobal: (new) qEnvironmentVariableIs{Set,Empty}()

These functions are a faster version of {,!}qgetenv().is{Null,Empty}(),
a common pattern in Qt code.

Their main advantage is that they don't need to allocate memory, so
they can be used in noexcept functions, or dynamic initialisation of
namespace-scope statics, because throwing in these contexts invokes
std::terminate().

Change-Id: I651c5bd72f450b5d7df76590f8791572fe992af5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoRemove code duplication in QStandardPaths implementations
David Faure [Wed, 8 Aug 2012 15:56:22 +0000 (17:56 +0200)]
Remove code duplication in QStandardPaths implementations

Using the new getter to access the "test mode" setting.

Change-Id: Id26a350cd3fab4bf2e5f58ba67bc7323f99c9cc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoAdd bool QStandardPaths::isTestModeEnabled()
David Faure [Wed, 1 Aug 2012 15:28:39 +0000 (17:28 +0200)]
Add bool QStandardPaths::isTestModeEnabled()

Library code might need to know this, e.g. when calling an external
process, to give it the right configuration. (For instance when
ksycoca code calls kbuildsycoca to recreate the DB at the right place).

Change-Id: I343ddefff816586f9d391973c08ff1e1ad86bf0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoOpenGL: Allow querying OpenGL extensions via the QOpenGLContext
Sean Harmer [Tue, 7 Aug 2012 08:37:30 +0000 (09:37 +0100)]
OpenGL: Allow querying OpenGL extensions via the QOpenGLContext

Change-Id: Ia88470554bbfd2a56738dadfcafafe42a990382d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
11 years agoFix qlayout autotest build for WinCE.
Janne Anttila [Tue, 19 Jun 2012 08:22:46 +0000 (11:22 +0300)]
Fix qlayout autotest build for WinCE.

SRCDIR was not defined for WinCE but it should no longer be used.
Fixed test case to use QFINDTESTDATA instead.

Change-Id: I07cbf7d42790d33e2d205d1682ec10e7577a92bd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
11 years agoUse native handles for parent change check in QWindowsWindow.
Miikka Heikkinen [Wed, 8 Aug 2012 10:48:29 +0000 (13:48 +0300)]
Use native handles for parent change check in QWindowsWindow.

QWindow::setParent() sets the parent to zero instead of the desired
parent, if platform window has not yet been created for the parent.
This caused QWindowsWindow::setParent() to skip setting the parent
later, when correct window was specified, as the QWindow parent-child
relationship hadn't changed. Fixed by changing the the check to use
native handles instead.

Task-number: QTBUG-26791
Change-Id: I292a1ddf746583a7268f2d07c20166995c0dd7d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoNeed to have the XI2 import to detect XI_TouchBeginMask
Shawn Rutledge [Thu, 9 Aug 2012 09:50:01 +0000 (11:50 +0200)]
Need to have the XI2 import to detect XI_TouchBeginMask

Followup to I5c925ae3e191244c7ab9415e4ba2fe49b93dd2af : touch was not
actually working by default.  A major symptom was getting double-clicks
instead of clicks on buttons and such, making it quite hard to
interact with anything.  There are some problems remaining.

Change-Id: I09fa5965036bac242ccc1f4db71f6d912445ca01
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
11 years agofix conditions in embed_manifest_*.prf
Joerg Bornemann [Wed, 8 Aug 2012 09:24:54 +0000 (11:24 +0200)]
fix conditions in embed_manifest_*.prf

MSVC 2012 was ignored.

Change-Id: I41b2dff85c037ce8057c91036434aa26cd9b5d5c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoMark QElapsedTimer functions as Q_DECL_NOTHROW
Thiago Macieira [Mon, 6 Aug 2012 14:27:18 +0000 (16:27 +0200)]
Mark QElapsedTimer functions as Q_DECL_NOTHROW

All functions in QElapsedTimer are marked Q_DECL_NOTHROW. This code
is often introduced in many places to deal with timeouts and doesn't
need exception handlers. In particular, it's used in QMutex locking.

In addition, mark QDateTime::currentMSecsSinceEpoch as nothrow, as it
can't throw exceptions either and it is needed by the generic
QElapsedTimer.

Q{Date,Time}::current{Date,Time} operate on local time and run into at
least one cancellation point, which we must consider throwing. And
returning a QDateTime allocates memory.

Change-Id: Id776c5ec831fc06d7419a9ff5442d9b35cff1a22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoAdd Q_DECL_NOTHROW to QRefCount.
Thiago Macieira [Mon, 6 Aug 2012 14:01:40 +0000 (16:01 +0200)]
Add Q_DECL_NOTHROW to QRefCount.

For the same reason as the previous commit (about the atomic classes),
mark these functions as never throwing an exception.

Change-Id: Idf46e41b226f54cb8658416efdf985ca40dd2952
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoMark all atomic functions as Q_DECL_NOTHROW
Thiago Macieira [Mon, 6 Aug 2012 15:48:42 +0000 (17:48 +0200)]
Mark all atomic functions as Q_DECL_NOTHROW

Actually, only the "new" atomics are marked. The old implementation,
based on qoldbasicatomic.h is unchanged, but should still work without a
problem.

The following configurations were tested and do work:
 - x86 64-bit
 - x86 32-bit
 - generic GCC
 - generic C++11 std::atomic
 - bootstrap
 - ARMv6 and 7
 - MIPS
 - MSVC 2010 32-bit
 - MSVC 2010 64-bit

The only two configurations untested are IA-64 and ARMv5. Except for
MSVC, all configurations were tested with GCC 4.6 (MIPS and ARM) and 4.7
(x86 and generics).

Change-Id: Iecbfeacd9d20b535453e91335165e9a221e0b47e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoAdd Q_DECL_NOTHROW to the atomic functions
Thiago Macieira [Fri, 3 Aug 2012 19:13:22 +0000 (21:13 +0200)]
Add Q_DECL_NOTHROW to the atomic functions

These functions are inline (on most architectures) but they contain
inline assembly which the compiler could not understand. In any case,
if it decides not to inline them, it would need to generate exception
handlers.

Change-Id: If9d50793d715c51781e76d0a539da03a6d83e255
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoCall clear() instead of empty() in addressbook/part6 tutorial.
Mitch Curtis [Wed, 8 Aug 2012 11:48:07 +0000 (13:48 +0200)]
Call clear() instead of empty() in addressbook/part6 tutorial.

empty() doesn't remove elements, it just returns whether it is empty.

Task-number: QTBUG-8849
Change-Id: I9bb8e855d96cecd2a0df336cb46e308ddedf0d07
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoLogging: mark qt_assert()/qt_assert_x()/qFatal() as nothrow
Marc Mutz [Fri, 3 Aug 2012 08:38:00 +0000 (10:38 +0200)]
Logging: mark qt_assert()/qt_assert_x()/qFatal() as nothrow

These functions are not supposed to return, not even by exception.
qt_message() _can_ throw, but we're fine with the compiler calling
std::terminate() then, since the backtrace will still include the
assertion location.

This behaviour is ensured by a new macro, QT_TERMINATE_ON_EXCEPTION,
which expands to something like
   try { expr; } catch(...) { std::terminate(); }
if the compiler doesn't support Q_DECL_NOEXCEPT (but maybe
Q_DECL_NOTHROW), and to something like just
   expr;
otherwise (including in the QT_NO_EXCEPTION case).

The real macro preserves scopes in all cases, and aims
to work even if <exception> isn't included in the TU it's used in,
so is a little bit more complex than that.

Change-Id: Ie6a2b7776e6aa77e57bd9aea6e184e5fa1cec81c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoRemove unnecessary extra indentation in the EXPORT macros
Thiago Macieira [Wed, 8 Aug 2012 13:55:14 +0000 (15:55 +0200)]
Remove unnecessary extra indentation in the EXPORT macros

Change-Id: I54585fa7e38ea1984018c5cbff9bc4626016bace
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoRemove the Q_xxx_EXPORT macros of other modules from qglobal.h
Thiago Macieira [Thu, 7 Jun 2012 12:34:47 +0000 (14:34 +0200)]
Remove the Q_xxx_EXPORT macros of other modules from qglobal.h

The macros have been moved to their respective modules.

Change-Id: I653668b608cd3b79824a25b0e7b1c238330c0007
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoRename QMapData::free to destroy
Thiago Macieira [Wed, 8 Aug 2012 13:02:30 +0000 (15:02 +0200)]
Rename QMapData::free to destroy

The convention for QMap is that "free" methods simply free memory and
that "destroy" ones also run destructors of types affected. Since this
function calls destroySubTree, it should be more properly called
"destroy".

This also gets rid of another function called simply "free" in our
headers.

Change-Id: I3fa621c78848ede33dd5b78428c704d0423ba4e7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoRename QLinkedList::free to freeData for consistency
Thiago Macieira [Wed, 8 Aug 2012 12:57:39 +0000 (14:57 +0200)]
Rename QLinkedList::free to freeData for consistency

QLinkedList does use allocations in the .h, by way of operator new and
operator delete. But for consistency with other classes, don't call our
function free().

Change-Id: I9295f5945619ad4ea82fd1f7f55b34700c54e06a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoRename QContiguousCache allocate and free functions to say "Data"
Thiago Macieira [Wed, 8 Aug 2012 12:54:32 +0000 (14:54 +0200)]
Rename QContiguousCache allocate and free functions to say "Data"

The important change is to use functions not called malloc and
free. On some old systems or under some weird circumstances, they
might be #defined to something different. More importantly, this
allows us to quickly verify whether we're using the stdlib.h functions
in our public headers.

Change-Id: I66b963ac2bc75d64028c04542e62a929e4b36b19
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoRemove use of ::free from qlist.h
Thiago Macieira [Wed, 8 Aug 2012 12:44:51 +0000 (14:44 +0200)]
Remove use of ::free from qlist.h

The memory is allocated in qlist.cpp, so it should be freed in
qlist.cpp. Freeing it in qlist.cpp ties our hands about future
improvements to the allocator.

In addition, silence the warning by the too-smart-for-its-own-good GCC
that we're trying to free a non-heap object:

  qlist.h:763:14: warning: attempt to free a non-heap object "QListData::shared_null" [-Wfree-nonheap-object]

The warning is wrong. It should say "possibly" somewhere because GCC
failed to account for all conditions in the path to free().

Change-Id: I34a6c16bba9a2197fc83eb3c7a63ae06fb25bf15
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoUpdate Raspberry Pi mkspec
Donald Carr [Wed, 11 Jul 2012 18:21:24 +0000 (18:21 +0000)]
Update Raspberry Pi mkspec

Hard float enabled Raspbian image is now primary platform provided by the
Raspberry Pi foundation.

Change-Id: I2d59ad26fac459907b4f51764975a3e6e29c6033
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agoMake it possible to force generation of debug info in release builds
Andreas Holzammer [Tue, 7 Aug 2012 20:22:38 +0000 (22:22 +0200)]
Make it possible to force generation of debug info in release builds

Change-Id: Ie79e5a6a87475d5140163a2a547b4385a53fc05f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoExplained rectangle bounding in documentation.
Leonard Lee [Mon, 6 Aug 2012 12:42:00 +0000 (14:42 +0200)]
Explained rectangle bounding in documentation.

Task-number: QTBUG-26756
Change-Id: Ifa56cbe249164e239f21c00fc31cd6ddd81705ad
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agoExplained degree unit in QPainter::rotate() function.
Leonard Lee [Mon, 6 Aug 2012 11:14:23 +0000 (13:14 +0200)]
Explained degree unit in QPainter::rotate() function.

Task-number: QTBUG-26757
Change-Id: I9a03480513819aefb78d914a7170fb4997181643
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agostatemachine: Really fix signal transition handling in multi-threaded setup
Kent Hansen [Wed, 1 Aug 2012 10:59:28 +0000 (12:59 +0200)]
statemachine: Really fix signal transition handling in multi-threaded setup

Commit f9a17d7f0f02f7af849afdf653a763ffdaf78a1b fixed it for the case
where the sender object is in a different thread at transition setup
time. However, it still didn't work if either the sender object or the
state machine was moved to a different thread at some later time,
before the machine was started.

Therefore: Bite the sour grape and traverse all the machine's
transitions when the machine is being started, registering those
signal transitions whose sender objects are in other threads.

This will increase the machine's startup time (proportional to the
number of transitions), but at least it works in all known scenarios,
meaning we don't have to document weird restrictions regarding the
order in which the user's operations have to be done.

Task-number: QTBUG-19789
Change-Id: I5f1dd1321994e49635f52be65cf56d2678ed1253
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
11 years agoremove unused Q_FS_FAT from Windows qplatformdefs.h
Joerg Bornemann [Wed, 8 Aug 2012 09:14:03 +0000 (11:14 +0200)]
remove unused Q_FS_FAT from Windows qplatformdefs.h

Change-Id: I12a70c8a06fa5d82db1cb3d6e6a7ed870e7a8ec5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoremove embed_manifest_* from common Windows CE mkspec
Joerg Bornemann [Wed, 8 Aug 2012 09:02:00 +0000 (11:02 +0200)]
remove embed_manifest_* from common Windows CE mkspec

They had no effect anyways due to the check in the embed_manifest*.prf
files.

Change-Id: I3cd145030876d91948794d376a18a47e297f3b3a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
11 years agoDefine QT_NO_FOO also when -no-foo is passed to configure.
Davide Pesavento [Wed, 8 Aug 2012 07:36:23 +0000 (00:36 -0700)]
Define QT_NO_FOO also when -no-foo is passed to configure.

This fixes a build failure that happens when Qt is configured with
-no-libudev, as reported at https://bugs.gentoo.org/show_bug.cgi?id=430292

Change-Id: I924f023505ab57cca5994f2fd5ff2f8308e61617
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoAvoid potential crash.
Gunnar Sletta [Tue, 7 Aug 2012 09:52:43 +0000 (11:52 +0200)]
Avoid potential crash.

The setGeometry call triggers a resizeEvent() so make sure the backing
store is created before that.

Change-Id: I26aa3ef6c0515311e3ca21f938a92ca1a20d0030
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
11 years agoadjust qtAddLibrary() to new qtAddModule() parameters
Oswald Buddenhagen [Wed, 8 Aug 2012 07:49:15 +0000 (09:49 +0200)]
adjust qtAddLibrary() to new qtAddModule() parameters

Change-Id: Ib5918fa83e78d16fd318590c33b280d9054b2cd6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agorename qt_module_config.prf => qt_module.prf
Oswald Buddenhagen [Tue, 7 Aug 2012 17:00:38 +0000 (19:00 +0200)]
rename qt_module_config.prf => qt_module.prf

this is more logical, following the qt_plugin and qt_tool scheme.

Change-Id: Ib3b2abec6728cdab260e15128b1cd78e8e6f5d6a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoremove dead unsupported/win32-borland spec
Oswald Buddenhagen [Tue, 7 Aug 2012 16:56:06 +0000 (18:56 +0200)]
remove dead unsupported/win32-borland spec

Change-Id: I010160f030dc44c84d2c84a36e8920ce3275f278
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agopreserve the directory structure of QML_FILES
Oswald Buddenhagen [Mon, 6 Aug 2012 20:27:26 +0000 (22:27 +0200)]
preserve the directory structure of QML_FILES

Change-Id: I39ccdbf59887f14be7dad492598160eebb94ce78
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agosupport installs with target dir
Oswald Buddenhagen [Tue, 7 Aug 2012 15:25:00 +0000 (17:25 +0200)]
support installs with target dir

this adds a .base "member" to the install "structure". if specified, only
this much is stripped from the front of each element of .files, rather
than the entire path, to obtain the target filename.

Change-Id: Ic39fcf71c4ad874ffabbbad113be9cdc6e3f7260
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoreshuffle assembly of install commands as well
Oswald Buddenhagen [Tue, 7 Aug 2012 15:14:39 +0000 (17:14 +0200)]
reshuffle assembly of install commands as well

don't make a single string, but a string list which is join()ed in the end.
this is a tad slower, but the code is way easier to work with.

Change-Id: I1ff7168c2770998761a6081be8080c743ddc94a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoreshuffle assembly of uninstall commands
Oswald Buddenhagen [Tue, 7 Aug 2012 14:35:11 +0000 (16:35 +0200)]
reshuffle assembly of uninstall commands

make a proper stringlist of commands, and join it in reverse order
only at the end. the reversal ensures that we can cleanly fold up
directory hierarchies we may build.

Change-Id: I9a241361588a6965283aec5258e1d622b35514e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoremove pointless appending of trailing dir separator under unix
Oswald Buddenhagen [Tue, 7 Aug 2012 14:59:07 +0000 (16:59 +0200)]
remove pointless appending of trailing dir separator under unix

Change-Id: Ia9b181db57ac2ee93cd412d58fe6ecbc5637a2f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoClarify how days are counted in QDateTime::daysTo documentation.
Mitch Curtis [Mon, 6 Aug 2012 10:08:42 +0000 (12:08 +0200)]
Clarify how days are counted in QDateTime::daysTo documentation.

Mention that the days are counted as the amount of times midnight is
reached between the start and end date.

Task-number: QTBUG-26780
Change-Id: I22ff6c56b748ac968d6991e0be3e10905c0634bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoRemove more -Werror from any test other than headersclean.
Thiago Macieira [Tue, 7 Aug 2012 12:11:37 +0000 (14:11 +0200)]
Remove more -Werror from any test other than headersclean.

As was done in dc56fb18a7c8d58087b8548b5cb134dbb4f9d4ab, but which
didn't catch all cases.

Change-Id: I9417a8d13339dd8fc95030dd5bad70f2c6f69756
Reviewed-by: hjk <qthjk@ovi.com>
11 years agolet qmake auto-generate d-bus adaptors and interfaces
Oswald Buddenhagen [Thu, 2 Aug 2012 18:50:01 +0000 (20:50 +0200)]
let qmake auto-generate d-bus adaptors and interfaces

Change-Id: If721dc2d75e382bde6bf9bcda921170186406c7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agofactor qml_module out of qml_plugin
Oswald Buddenhagen [Mon, 6 Aug 2012 18:39:49 +0000 (20:39 +0200)]
factor qml_module out of qml_plugin

this makes it comfortable to create qml-only modules

Change-Id: I17a5a3ee24210b93db05e50502c6ca91a4e7a9d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agouse global imports install location as the "build" dir for qml plugin files
Oswald Buddenhagen [Mon, 6 Aug 2012 15:07:18 +0000 (17:07 +0200)]
use global imports install location as the "build" dir for qml plugin files

when doing a non-prefix build (which is the only case where the code is
executed), the build location is always the same anyway, so there is no
use in complicating things.

Change-Id: Id98755d818e05a11bed505abcb8b9d52a7d5b7c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agocopy qml files to build dir only when doing a non-prefix build
Oswald Buddenhagen [Mon, 6 Aug 2012 14:53:44 +0000 (16:53 +0200)]
copy qml files to build dir only when doing a non-prefix build

non-installed -prefix builds can't do anything useful with qml plugin
files anyway, so don't waste time on copying them.

Change-Id: I23f4b8f67402a85d3c6e741a04f88567655c1655
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agomove IMPORT_VERSION fallback into the conditional of the consumer
Oswald Buddenhagen [Mon, 6 Aug 2012 14:44:52 +0000 (16:44 +0200)]
move IMPORT_VERSION fallback into the conditional of the consumer

Change-Id: I01336903aaaff8bca5407aa3c50d330e8fd7910a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agomove qmltypes "compiler" below TARGET manipulation
Oswald Buddenhagen [Mon, 6 Aug 2012 14:43:43 +0000 (16:43 +0200)]
move qmltypes "compiler" below TARGET manipulation

load(resolve_target) must not be called before we have a final target
name.

Change-Id: Ia7418672b0c7b7fbd388a63819af9ea9a54c5241
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoRename msvc11 to msvc2012
Andreas Holzammer [Tue, 7 Aug 2012 17:12:41 +0000 (19:12 +0200)]
Rename msvc11 to msvc2012

Microsoft has named their new Visual Studio again
after the old naming schema.

Change-Id: Ib1b971807fa89d90b10892a2d78570058e564f3a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
11 years agoQ_DECL_NOTHROW: stronger and more widely available version of Q_DECL_NOEXCEPT
Marc Mutz [Mon, 6 Aug 2012 23:54:13 +0000 (01:54 +0200)]
Q_DECL_NOTHROW: stronger and more widely available version of Q_DECL_NOEXCEPT

Commit 1adca807 defined Q_DECL_NOEXCEPT to be the same as throw() for the
Microsoft compiler. However, the two are not equivalent:

- C++11 noexcept is defined to call std::terminate() if a noexcept
  function nevertheless encounters an exception.
- MSVC throw() has essentially undefined behaviour in this situation:
  http://msdn.microsoft.com/en-us/library/wfa0edys%28v=vs.100%29
   "Due to code optimizations that might be performed by the C++
    compiler [...] if a function does throw an exception, the program
    may not execute correctly."

So define two macros:

1. Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR always have C++11 behaviour.
   This is expected to be the more efficient implementation if the
   function can actually throw.
2. Q_DECL_NOTHROW means that the function gives the nothrow
   guarantee. It is stronger than noexcept, but not all functions
   that can be marked Q_DECL_NOEXCEPT can be marked Q_DECL_NOTHROW.
   In general Q_DECL_NOTHROW functions need to use a try/catch block
   in order to prevent exceptions from leaving the functions, unless
   you can proove that none of the operations can throw.

For the caller, both macros are equivalent: it can be relied on that
no exception leaves the function.

Change-Id: I32f822a82e06a31cb71d38db438387aee5ec3334
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agoImprove the QOpenGLExtensionMatcher class
Sean Harmer [Fri, 20 Jul 2012 15:21:47 +0000 (16:21 +0100)]
Improve the QOpenGLExtensionMatcher class

Using a QSet<QByteArray> internally means that checking for the
presence of an extension no longer uses an O(N) search.

This patch also allows users of this class to easily get a list
of the supported extensions.

Change-Id: I02194e5345573c47be0876f3ea6eb6b69a2ead81
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agoqmake vcxproj generator: map TARGET_EXT to $(TargetExt)
Joerg Bornemann [Tue, 7 Aug 2012 15:16:56 +0000 (17:16 +0200)]
qmake vcxproj generator: map TARGET_EXT to $(TargetExt)

Task-number: QTBUG-26782

Change-Id: Ib143fa6b8674c4d09d798a9301bb209b886e791d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoqmake: un-copy-and-pastify vcxproj generator a bit
Joerg Bornemann [Tue, 7 Aug 2012 15:07:50 +0000 (17:07 +0200)]
qmake: un-copy-and-pastify vcxproj generator a bit

Reusing already built strings improves readability and performance.

Change-Id: I8555fb860561ff214ae123efeda78fc770b6459f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoAdd the filters for extra compilers for vcxproj files
Andy Shaw [Fri, 3 Aug 2012 13:25:48 +0000 (15:25 +0200)]
Add the filters for extra compilers for vcxproj files

The files were grouped into the relevant filters but the filters
themselves were not added.  This now ensures the filters are added to the
vcxproj files so they appear grouped correctly.

Task-number: QTBUG-26755

Change-Id: I7d2c6fa96dcbb0496fd9d1bb1d01e7dd660052f4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agofix class and file names in the d-bus examples
Oswald Buddenhagen [Thu, 2 Aug 2012 18:49:12 +0000 (20:49 +0200)]
fix class and file names in the d-bus examples

some omissions from the com.trolltech => org.example replacement.

Change-Id: I078c272fc3729fc7b9e9cd3e6ede7c21f0386b62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoAdd possibility to add OpenSSL, DBUS, MySQL path under Windows
Andreas Holzammer [Mon, 6 Aug 2012 18:34:34 +0000 (20:34 +0200)]
Add possibility to add OpenSSL, DBUS, MySQL path under Windows

Under Windows it's quite possible that OpenSSL, DBUS or MySQL is
not installed into a central place. If -I and -L is
passed at configure time, it is added to all targets,
and if that path contained a conflicting header things would go
wrong.

Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoQtGui: collapse two qgetenv() on the same variable
Marc Mutz [Mon, 6 Aug 2012 22:13:44 +0000 (00:13 +0200)]
QtGui: collapse two qgetenv() on the same variable

Store the result in a temporary QByteArray and continue
working with that one.

Change-Id: I24bc243f0f3dfb37d840faf7592b3383bd37c7e2
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQUrl::idnWhiteList(): add QList::reserve() call
Marc Mutz [Sat, 4 Aug 2012 06:16:47 +0000 (08:16 +0200)]
QUrl::idnWhiteList(): add QList::reserve() call

Avoids reallocation.

Change-Id: I3238574590463596a797d237b066ef60214392a7
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQtNoDebug: remove special member functions
Marc Mutz [Fri, 3 Aug 2012 08:55:04 +0000 (10:55 +0200)]
QtNoDebug: remove special member functions

These are better generated by the compiler.

Change-Id: I5afa9fd17997c220622ed0e5990c33e52700840f
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoOnly emit the clicked() signal from views if the left button is used.
Stephen Kelly [Mon, 6 Aug 2012 12:30:47 +0000 (14:30 +0200)]
Only emit the clicked() signal from views if the left button is used.

This is consistent with QAbstractButton, QCalendarWidget,
QDialogButtonBox and QGroupBox (ie, all other widgets with
a clicked signal)

Task-number: QTBUG-26105

Change-Id: Ieafe988b5c03216796b69a7cd70ac1a03fc12b0a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoEnsure that we return an invalid QTableWidgetItem when none is available.
Stephen Kelly [Mon, 6 Aug 2012 16:36:44 +0000 (18:36 +0200)]
Ensure that we return an invalid QTableWidgetItem when none is available.

Task-number: QTBUG-26195

Change-Id: Iede4f51770bd8c8eab3558137aaf7b1721f25a87
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoadd support for PKGCONFIG_PRIVATE
Oswald Buddenhagen [Thu, 2 Aug 2012 14:17:05 +0000 (16:17 +0200)]
add support for PKGCONFIG_PRIVATE

this does the same as PKGCONFIG, only that the libraries end up in
LIBS_PRIVATE, not LIBS, which means they don't end up in prl files.
in the vast majority of cases, the user should use this new variable.

Change-Id: Icb57a1166f1896f51284c64e4047cfc79410e73a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agoadd support for QT_PRIVATE
Oswald Buddenhagen [Thu, 2 Aug 2012 14:09:04 +0000 (16:09 +0200)]
add support for QT_PRIVATE

this is handled the same way as the QT variable, only that the actual
libraries end up in LIBS_PRIVATE, not LIBS, which means they don't end up
in prl files.

the handling of the two variables is entirely independent, including
independent dependency resolution, so some libraries will typically end
up twice on the linker command line. this is not a problem.

Change-Id: I257ad0d414bf273c08a7bd6a874fe9ddb7356009
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agorespect copy_dir_files with manually flagged directories as well
Oswald Buddenhagen [Mon, 6 Aug 2012 19:45:58 +0000 (21:45 +0200)]
respect copy_dir_files with manually flagged directories as well

otherwise the second installation on unix would be bogus.

Change-Id: I162533ee262c6820e7e2d4710b5342cafecd9d59
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agocentralize+fix addition of copy_dir_files flag
Oswald Buddenhagen [Mon, 6 Aug 2012 19:34:24 +0000 (21:34 +0200)]
centralize+fix addition of copy_dir_files flag

this is in fact a shell-related flag, which determines how QMAKE_DIR_COPY
is assumed to behave.

Change-Id: If774f8a83b40c9ae7107c8e7ef7263af8a2e6c6e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoremove not particularly useful branch
Oswald Buddenhagen [Mon, 6 Aug 2012 19:42:41 +0000 (21:42 +0200)]
remove not particularly useful branch

we just determined that the file does not exist, so it's entirely
pointless to query its type from the file system. consequently, the
respective fallback branch would assume a regular file anyway.

Change-Id: I42590ffc2a5f650fb430a9398cb1859217ed4350
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoremove clearly bogus escapeFilePath() call
Oswald Buddenhagen [Mon, 6 Aug 2012 18:45:51 +0000 (20:45 +0200)]
remove clearly bogus escapeFilePath() call

the value is still re-processed numerous times, end each "exit path"
does own escaping, while not every path can deal with an escaped path.

Change-Id: I0bf4a043809bf4b7877d02e5d8dfe8f794a7dd00
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agomake $$relative_path() minimize already relative paths
Oswald Buddenhagen [Mon, 6 Aug 2012 18:44:10 +0000 (20:44 +0200)]
make $$relative_path() minimize already relative paths

QDir::relativeFilePath() doesn't do anything if the path is already
relative, so make it absolute first to force a re-calculation.

the cleanPath() is gone, as relativeFilePath() already does that.

Change-Id: I8f4d0d839db3fe99a608f70916b4b5bd52c56535
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoifdef drivespec handling in relativeFilePath to windows
Oswald Buddenhagen [Mon, 6 Aug 2012 18:41:18 +0000 (20:41 +0200)]
ifdef drivespec handling in relativeFilePath to windows

on unix, the code wouldn't do anything except burning cycles anyway.

Change-Id: I1c28b1a7014af93ca70a17e0bd669debad8003c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoProperly manage window geometry in kms
Laszlo Agocs [Thu, 2 Aug 2012 08:08:16 +0000 (11:08 +0300)]
Properly manage window geometry in kms

If QWindow::setGeometry() is called before QWindow::create(),
QKmsWindow::setGeometry() is not called at all. This is wrong
because there is some special size restricting happening there
which must never be skipped.

Change-Id: I321632d4fdb327b0a75e6791c019b3f4c2793888
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
11 years agoqdoc: Don't always add example .qdoc files to source list
Martin Smith [Tue, 7 Aug 2012 07:50:33 +0000 (09:50 +0200)]
qdoc: Don't always add example .qdoc files to source list

When qdoc finds a .qdoc file in an exampledirs directory,
it only adds it to the source list if it isn't already in
the source list. This may be overkill, but it's safe.

Change-Id: I2c5714c968f06e90f9b29b3a5481f80469e19ced
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
11 years agoOnly use glXCreateContext if glXCreateContextAttribsARB did not succeed.
Zeno Albisser [Fri, 3 Aug 2012 11:37:03 +0000 (13:37 +0200)]
Only use glXCreateContext if glXCreateContextAttribsARB did not succeed.

If glXCreateContextAttribsARB does not succeed or is not available,
we should fallback to using glXCreateContext. But we should not just
create a context with glXCreateContext by default that is being thrown
away if glXCreateContextAttribsARB succeeds.
Otherwise glXMakeCurrent with context 0 might cause an unexpected
context change when dealing with multiple contexts.

Change-Id: I7627abbe2500b4006180653a1b3b074fe7aca1d3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
11 years agoDon't export QAtomicInt, it's all inline
Thiago Macieira [Mon, 6 Aug 2012 18:38:08 +0000 (20:38 +0200)]
Don't export QAtomicInt, it's all inline

Moreover, exporting it causes the horrible side-effect on Windows
(with MSVC) that the compiler will not inline the functions, but
instead will place indirect calls to the functions in QtCore DLL,
even in release mode. For such a critical piece of code, inlining
is necessary.

Change-Id: Ib31c12f6bf8dc8ece1b51824716a480559753c24
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agoAdd a T parameter to the memory barrier functions in atomics.
Thiago Macieira [Fri, 3 Aug 2012 18:02:03 +0000 (20:02 +0200)]
Add a T parameter to the memory barrier functions in atomics.

This is so we can insert valgrind (helgrind) annotation macros. They
require the actual address of the variable to work.

Change-Id: I988f6a46385ad58143c53ad34b6cf0f58be2cdb8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoQMessageLogger: mark default ctor as constexpr, too
Marc Mutz [Fri, 3 Aug 2012 08:58:37 +0000 (10:58 +0200)]
QMessageLogger: mark default ctor as constexpr, too

Change-Id: I6f92f4a01e43dbe811b11b3e8d9b8a02a31463c5
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoAvoid crashes when invalidating a proxy model filter.
Stephen Kelly [Mon, 6 Aug 2012 14:45:06 +0000 (16:45 +0200)]
Avoid crashes when invalidating a proxy model filter.

Task-number: QTBUG-26107
Change-Id: I2df7ae6402136570c8469d3251edae6ca8290f1f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoDo not draw garbage branches if 0px indentation is specified.
Stephen Kelly [Mon, 6 Aug 2012 16:46:50 +0000 (18:46 +0200)]
Do not draw garbage branches if 0px indentation is specified.

This can't realisitically be unit tested.

Task-number: QTBUG-26305

Change-Id: If7f56c44c472ff0ffbda4744b76ed2119bb64bf8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>