profile/ivi/qtbase.git
12 years agoDirectWrite font engine: don't leak the font table buffer
Konstantin Ritt [Mon, 2 Jul 2012 04:44:27 +0000 (07:44 +0300)]
DirectWrite font engine: don't leak the font table buffer

Ideally, each TryGetFontTable() call sequence should be followed
by the call to ReleaseFontTable() with the context value
taken from the first TryGetFontTable() call,
otherwise we'll leak the buffer allocated for the font table.

Change-Id: I627bf0133b7f61798e82929723ccfb780ce9ee69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoqmake: improve the .pc files generator
Konstantin Ritt [Sat, 30 Jun 2012 06:05:13 +0000 (09:05 +0300)]
qmake: improve the .pc files generator

Don't hardcode the "qt_config" EXTRA variable and use QMAKE_PKGCONFIG_VARIABLES instead.
This allows qmake create the .pc files that are unrelated to Qt.

Change-Id: Ic72005e8819a15f6c50f3aaf79424a247fba20af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix capitalization with newline bug
Yann Bodson [Mon, 25 Jun 2012 03:22:12 +0000 (13:22 +1000)]
Fix capitalization with newline bug

We only want to change the capitalization if the QScriptAnalysis flag
was Lowercase, Uppercase or SmallCaps.

Task-number: QTBUG-17485
Change-Id: Icbecb09b06a9153866ae81d592b3f6779c2dafb5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoForward the CMAKE_PREFIX_PATH to invoked tests.
Stephen Kelly [Fri, 29 Jun 2012 06:34:28 +0000 (08:34 +0200)]
Forward the CMAKE_PREFIX_PATH to invoked tests.

Change-Id: I5166fb39dcf3ab660c971c4c68b714f534de40cb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMove the macros for invoking ctest to a shared location.
Stephen Kelly [Fri, 29 Jun 2012 06:32:01 +0000 (08:32 +0200)]
Move the macros for invoking ctest to a shared location.

They are still internal, but all Qt5 modules will be able to use
them then.

Change-Id: I42ab656115b0976ca959293dfd664ec071f35dbf
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoLook for CMake config files in the same prefixes as mkspecs.
Stephen Kelly [Fri, 29 Jun 2012 06:18:56 +0000 (08:18 +0200)]
Look for CMake config files in the same prefixes as mkspecs.

This will allow tests of modules outside of qtbase to find their
CMake config files.

Change-Id: I68036908d0fd2ec640530b57d0f572d211ef44f0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoSimplify logic for paths to CMake modules in tests.
Stephen Kelly [Fri, 29 Jun 2012 20:34:12 +0000 (22:34 +0200)]
Simplify logic for paths to CMake modules in tests.

Use a command line argument instead of an environment variable.

Change-Id: I518b21d1fb9567d182384885a308c76e108598d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd constexpr template specializations for built in metatypes.
Stephen Kelly [Sun, 1 Jul 2012 20:55:54 +0000 (22:55 +0200)]
Add constexpr template specializations for built in metatypes.

This will make it possible (in Qt 6) to remove the enums listing
metatype ids. As it is constexpr, it can be used in switch statements
just like enums, as enum values, and as template specialization values.

Change-Id: I51293674c403714e34cb8a8b8953522fc97a740a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMark qgl autotest as significant for Windows
Kalle Juhani Lehtonen [Mon, 2 Jul 2012 01:19:48 +0000 (11:19 +1000)]
Mark qgl autotest as significant for Windows

After Mesa 3D OpenGL library deployment to Windows 7 machines the test
starts passing.

Task-number: QTBUG-25293
Change-Id: I228cd683359f3932670bfa6ec8c4f32e2b40144b
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoqmake: remove support for X.sources in DEPLOYMENT variables
Joerg Bornemann [Mon, 2 Jul 2012 13:21:15 +0000 (15:21 +0200)]
qmake: remove support for X.sources in DEPLOYMENT variables

This has been deprecated in Qt 4.8.0. Use X.files instead.

Task-number: QTBUG-3216
Task-number: QTBUG-25106

Change-Id: I581321591291118a13403e92da5997497e12c3fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoshapeTextWithHarfbuzz() minor optimization
Konstantin Ritt [Mon, 2 Jul 2012 15:15:56 +0000 (18:15 +0300)]
shapeTextWithHarfbuzz() minor optimization

If the used font engine is of type QFontEngine::Multi, then we already have
both the "font engine runs" and the stripped glyph indicies for the kerning
-> just call the actual font engine's doKerning() method.
If the font engine is not of type QFontEngine::Multi, then we could safely
avoid the glyph indicies extra manipulations.

Change-Id: Ia8899e6d7beecfd391b050683ac41c21465336e4
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoQNX: Enable threaded OpenGL rendering on QNX
Sean Harmer [Thu, 28 Jun 2012 07:50:34 +0000 (08:50 +0100)]
QNX: Enable threaded OpenGL rendering on QNX

The only complicated aspect to this was deferring EGLsurface
re-creation as a result of window geometry changes (e.g. when we
receive an orientation change event). To allow this to be done
in a controlled way we defer the surface manipulation until the
next call to QQnxGLContext::makeCurrent().

Change-Id: I8062d3e4d19220a822fbc3b8ca563bb1e3be09d0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoandroid: remove QT_NO_QWS_TRANSFORMED from mkspecs
Robin Burchell [Mon, 2 Jul 2012 08:23:02 +0000 (10:23 +0200)]
android: remove QT_NO_QWS_TRANSFORMED from mkspecs

this does nothing anymore

Change-Id: If8798335dea935d1df9f085a7b4e1658f426809b
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoandroid: fix stupid thinko where cflags were set before the common include
Robin Burchell [Mon, 2 Jul 2012 08:23:12 +0000 (10:23 +0200)]
android: fix stupid thinko where cflags were set before the common include

this meant that the common mkspec was unable to do 'sensible' things with the
cflags (hence -Wno-psabi not being applied to C++ code), and probably explains a
lot of other weird things.

Change-Id: I77079027dc1b2691c53212893eb90c7b935d00a2
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agobuildsystem: Remove SXE from the configure and qconfig-*.h files
Holger Hans Peter Freyther [Fri, 29 Jun 2012 16:59:29 +0000 (18:59 +0200)]
buildsystem: Remove SXE from the configure and qconfig-*.h files

The SXE feature was used with Qtopia but is long gone. Clean it up.

Change-Id: I55fba97b6382300ba63e94f3a6c415227f571e37
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake the CPU detection much more efficient in user code
Thiago Macieira [Mon, 2 Apr 2012 23:52:28 +0000 (20:52 -0300)]
Make the CPU detection much more efficient in user code

First, check that the option in question hasn't been already enabled
by the compiler, via compiler switches. If it has been, then we don't
need to verify anything, and we can assume that it's safe to use such
instructions. For example, on an x86-64 build, qCpuHasFeature(SSE2) is
always a constant true.

If the compile-time check fails, then we proceed to try and detect the
processor features at runtime. But instead of insisting on a call to
qDetectCPUFeatures, allow the code using the detection to read from a
variable and simply test it for values. Only if the variable isn't
initialised should it make a function call. The Q_ASSUME allows this
code to be very efficient even with multiple uses of qCpuHasFeature.

Change the uninitialised value from -1 to 0 so that simpler
instructions can be used to check for non-initialisation.

The qDetectCPUFeatures function is renamed to qDetectCpuFeatures to
match the Qt coding style and also to catch uses this code that need
to be adapted.

Change-Id: I24ca5a6ad21075e2e249e1a4f8f5057b8f68ce7c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix MinGW-w64 compilation
Jonathan Liu [Sun, 1 Jul 2012 06:19:59 +0000 (16:19 +1000)]
Fix MinGW-w64 compilation

Task-number: QTBUG-24699
Change-Id: If6210315926f0266045766bb5d3b00a6d0bdf703
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoChange qglfunctions autotest to insignificant on Windows
Kalle Juhani Lehtonen [Mon, 2 Jul 2012 01:12:50 +0000 (11:12 +1000)]
Change qglfunctions autotest to insignificant on Windows

Previously the test was skipped, because no OpenGL context was found.
After Mesa 3D OpenGL library distribution for Windows 7 machines,
OpenGL context is found, but the test crashes with exit code:
0xC0000409 (STATUS_STACK_BUFFER_OVERRUN)

Marking the test insignificant until the issue is resolved.

Task-number: QTBUG-26390
Change-Id: I996bbc3399704b541f5baa4832cf39b77b715c1c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImplement QVariant conversions for QObject derived pointer metatypes.
Stephen Kelly [Wed, 7 Mar 2012 17:13:39 +0000 (18:13 +0100)]
Implement QVariant conversions for QObject derived pointer metatypes.

canConvert() and convert() use the metaobject to convert such types.

Change-Id: Ic05e74c5c2423b4b9682b88adc856a16dcba4cff
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoStore the QMetaObject with the QMetaType.
Stephen Kelly [Sun, 1 Apr 2012 18:31:55 +0000 (20:31 +0200)]
Store the QMetaObject with the QMetaType.

This will allow conversion between pointers to compatible QObject
derived types.

Change-Id: I19e08934571fb3f1b91e594892214041fe5f6a11
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoDon't lower the code generation level options for the compiler
Thiago Macieira [Fri, 29 Jun 2012 09:22:27 +0000 (11:22 +0200)]
Don't lower the code generation level options for the compiler

If the default settings already include the necessary flags, do not
override the compiler flags, possibly lowering support. This allows
the user to specify a higher setting for a Qt build, such as what
MeeGo did (it enabled SSSE3 support in all builds).

Additionally, this prevents us from passing -msse2 or -arch:SSE2
options to x86-64 builds, as SSE2 is a mandatory part of that
architecture. This silences a warning from MSVC that the option is
unknown in 64-bit builds.

Change-Id: I6e2969b672bcac87168c245b8be3309e8cc49224
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake QtNetwork compile with qconfig small
Jeremy Katz [Thu, 28 Jun 2012 13:09:13 +0000 (15:09 +0200)]
Make QtNetwork compile with qconfig small

Task-number: QTBUG-24816

Change-Id: I8c7965e4498794db93ee51c8511c9a72071ddce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSupport the showIsFullScreen style hint in widgets.
Thomas McGuire [Wed, 27 Jun 2012 13:45:42 +0000 (15:45 +0200)]
Support the showIsFullScreen style hint in widgets.

Now QWidget::show() will be the same as QWidget::showFullScreen() if the
style hint is set.
This is consistent with QQuickView now.

De-inline related methods to make it easier to change them later
without breaking compatibility.

Change-Id: I843ac6f846428217bfc5dc9f1d0a554de9d0c08f
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agofix bugs surrounding reading super cache when no local cache is present
Oswald Buddenhagen [Wed, 27 Jun 2012 13:14:34 +0000 (15:14 +0200)]
fix bugs surrounding reading super cache when no local cache is present

we would ignore the early read variables and fail to export the super
cache's path to the project.

Change-Id: I3c467802b4af22f73be05b25dbd8ccb6196d28a8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFlag consistently failing tests as expected fail tests.
Toby Tomkins [Fri, 29 Jun 2012 03:54:21 +0000 (13:54 +1000)]
Flag consistently failing tests as expected fail tests.

Task-number: QTBUG-26372
Task-number: QTBUG-26371
Task-number: QTBUG-20984

Change-Id: I7ae558243c366769cd6c587e77f862558e8053a1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove stale qws related mkspecs
Donald Carr [Thu, 28 Jun 2012 23:12:28 +0000 (23:12 +0000)]
Remove stale qws related mkspecs

Should be be reintroduced with intent if there is sufficient interest, outside of the QWS context.

Change-Id: I598f47b5cf0c10dd66534294d0f27cf0b4e5069a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMigrate linux-clang mkspec out of unsupported
Donald Carr [Thu, 28 Jun 2012 23:03:27 +0000 (23:03 +0000)]
Migrate linux-clang mkspec out of unsupported

Change-Id: I84abc4c305c28e46dd514d3fb78d27c051dc6048
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQAbstractProxyModel autotest doesn't need widgets
Giuseppe D'Angelo [Fri, 29 Jun 2012 11:40:03 +0000 (12:40 +0100)]
QAbstractProxyModel autotest doesn't need widgets

After the QStandardItemModel move to QtGui.

Change-Id: I2be82d89518ff97cf164026ee8b13a41f9c93d4a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoMove QStandardItem/QStandardItemModel to QtGui
Giuseppe D'Angelo [Tue, 26 Jun 2012 16:30:57 +0000 (17:30 +0100)]
Move QStandardItem/QStandardItemModel to QtGui

The dependencies on QFont, QBrush, QIcon are all in QtGui, so there's
little sense to still have these classes in QtWidgets.

This also copies and pastes a version of QWidgetItemData as
QStandardItemData inside qstandarditemmodel_p.h.

Change-Id: Ibafc5a30748e7ce0b54753309ae6dc4a797fc20e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoMerge "Merge branch 'buildsystem' (second round)" into refs/staging/master
Mark Brand [Fri, 29 Jun 2012 19:26:11 +0000 (21:26 +0200)]
Merge "Merge branch 'buildsystem' (second round)" into refs/staging/master

12 years agoAdd mkspecs for android cross compilation.
Robin Burchell [Tue, 1 May 2012 12:39:23 +0000 (14:39 +0200)]
Add mkspecs for android cross compilation.

Using these requires setting two environment variables, e.g, for me:

export ANDROID_NDK_ROOT=/Users/burchr/android-ndk-r7c
export ANDROID_NDK_HOST=darwin-x86
./configure -opensource -confirm-license -xplatform unsupported/linux-android-armeabi-v7a-g++ -nomake examples -nomake demos -nomake tests -v

These mkspecs are somewhat based on the work of the Necessitas crew, kudos to
them for their work in getting the NDK integration into qmake.

Change-Id: I591e423ed8dc70616009f681c81890c696110e62
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoAdd framestrut mouse events.
Friedemann Kleint [Wed, 27 Jun 2012 14:20:18 +0000 (16:20 +0200)]
Add framestrut mouse events.

- Add infrastructure to QWindowSystemInterface.
- Add a setter for enabling framestrut events
  to QPlatformWindow.
- Add Windows implementation, pass keyboard modifiers.

QDockWidget relies on it for docking.

Task-number: QTBUG-26296
Change-Id: I9d84b356e9a5eb341f57b6f51f34b6b494ff7f87
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUpdate .gitignore
Giuseppe D'Angelo [Fri, 29 Jun 2012 12:23:08 +0000 (13:23 +0100)]
Update .gitignore

Change-Id: Iad041f3bc58544817b0a988875eed7b7973fa65b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQQnxWindow: properly scope a local variable
Marc Mutz [Fri, 29 Jun 2012 09:09:11 +0000 (11:09 +0200)]
QQnxWindow: properly scope a local variable

Change-Id: I71f1052f614f4e926acf2c2b76963770f7b35c96
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoMerge branch 'buildsystem' (second round)
Oswald Buddenhagen [Fri, 29 Jun 2012 07:05:36 +0000 (09:05 +0200)]
Merge branch 'buildsystem' (second round)

refactoring and cleanup. fixes x-builds between different os families.

Conflicts:
mkspecs/features/qt.prf

Change-Id: I0205e6f07f77c9b015cf055dd87a471883949a91

12 years agoFixed several unit tests to work in shadow builds
Kurt Korbatits [Fri, 29 Jun 2012 02:05:10 +0000 (12:05 +1000)]
Fixed several unit tests to work in shadow builds

- qlogging, qthreadstorage, qnetworkreply, qapplication, qfile, qprocess
  Added app_bundle and debug_and_release_target to CONFIG

Change-Id: I6212902c449520dc016da9590149a423069cc38c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd detection for C++11 noexcept
Thiago Macieira [Wed, 13 Jun 2012 13:23:12 +0000 (15:23 +0200)]
Add detection for C++11 noexcept

The Q_COMPILER_NOEXCEPT feature indicates whether this compiler has
support for noexcept. Note that the GCC C++11 status page does not
list this feature, but investigation into the source code as well as
testing reveals it's supported since GCC 4.6.

Also add Q_DECL_NOEXCEPT, to be used to declare that a function throws
no exceptions, and Q_DECL_NOEXCEPT_EXPR(x), which declares that the
function throws no exceptions if x evaluates to true. In C++98 mode,
these macros expand to empty -- the old C++98 and C++03 exception
specification is deprecated and considered harmful.

Change-Id: Ic84901d13eceb06dcc7f025a4b7fc8b250769be9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoClean up the EXPORT macros in qglobal.h.
Thiago Macieira [Wed, 6 Jun 2012 18:04:41 +0000 (20:04 +0200)]
Clean up the EXPORT macros in qglobal.h.

QtPlatformSupport is a static library. It should never export
anything, so Q_PLATFORMSUPPORT_EXPORT is unnecessary.

QtSql, QtXml, QtDBus, QtOpenGL and QtPrintSupport now have the macros
on their own source trees. It's possible these modules might be
separated out from qtbase in the future. For QtDBus, the macros are
moving back to where they used to be. This also leaves qglobal.h only
creating the macros for QtCore, QtGui, QtWidgets and QtNetwork, the
core libraries.

Q_CANVAS_EXPORT, Q_OPENVG_EXPORT and Q_COMPAT_EXPORT aren't used
anywhere in the Qt sources, so simply delete them. And the
Q_QUICK1_EXPORT macro in the static section was wrong, so remove it
too.

Change-Id: I50bdf86e783338f814903b25979721f788a7becf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove deprecated tentative commit from QInputMethodEvent
Pekka Vuorela [Tue, 26 Jun 2012 13:41:01 +0000 (16:41 +0300)]
Remove deprecated tentative commit from QInputMethodEvent

Introduced and deprecated during Qt5 development.
Change-Id: I5bceefcb5dfc13f8eae2ad22f04feeea5f87dcb3
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoChange CONFIG += staticlib to CONFIG += static
Thiago Macieira [Tue, 29 May 2012 16:40:31 +0000 (18:40 +0200)]
Change CONFIG += staticlib to CONFIG += static

That's the targetted, correct way of defining a static library.

Change-Id: I43c23bf7e1bc5fb07bbb55720a320eaca680b038
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQNX: Don't detach when iterating over child windows
Thomas McGuire [Thu, 28 Jun 2012 09:44:47 +0000 (11:44 +0200)]
QNX: Don't detach when iterating over child windows

Change-Id: I55dcc1d188a2c45a11b0ab6a194625b50906eca9
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoFix warning: returning non void by using Q_UNREACHABLE
Frederik Gladhorn [Thu, 28 Jun 2012 11:24:58 +0000 (13:24 +0200)]
Fix warning: returning non void by using Q_UNREACHABLE

Change-Id: I08e5b629582b1286c57f6c5f991e2adaf431daa4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com>
12 years agoMake QCalendarWidget use its locale's firstDayOfWeek.
Mitch Curtis [Thu, 21 Jun 2012 15:44:04 +0000 (17:44 +0200)]
Make QCalendarWidget use its locale's firstDayOfWeek.

QCalendarWidget currently uses Qt::Sunday as the default first day
of the week. It has been suggested that a better user experience
would see the calendar's locale be used instead.

Task-number: QTBUG-19811
Change-Id: I4441bf9ffd52213ef622a4a7f498530b7cc9e110
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agoQDoc: Allow '0' to be used as 2nd arg for \qmlclass.
Casper van Donderen [Thu, 28 Jun 2012 10:49:06 +0000 (12:49 +0200)]
QDoc: Allow '0' to be used as 2nd arg for \qmlclass.

There can be occurences of \qmlclass where there is no C++ class (for a
pure QML Type for example). QDoc will ignore searching for a C++ class
when '0' is specified as second argument to the \qmlclass command.

Change-Id: I09c8c7ad302daffb0723a49967951ca623e646e4
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoCall QObject::disconnectNotify() when receiver is destroyed
Kent Hansen [Mon, 25 Jun 2012 18:19:11 +0000 (20:19 +0200)]
Call QObject::disconnectNotify() when receiver is destroyed

Store the signal index in QObjectPrivate::Connection, thereby making
it available in "implicit" disconnect contexts (i.e., receiver
deletion).

This change does not cause the size of QObjectPrivate::Connection
to grow (still 40 bytes on 32-bit Linux, 72 bytes on 64-bit Mac).

Valgrinding the new benchmark indicates that the percentage of the
time spent in the QObject destructor increased from 7.8% to 8.4%
on ia32, for that particular stress test; the increase is the
combined cost of calling metaObject(), QMetaObjectPrivate::signal(),
and disconnectNotify() for one connection. In practice, the measured
wallclock time increased by about 3ms for a 500ms run (which
repeatedly constructs, connects, and destroys an object).

Task-number: QTBUG-4844

Change-Id: I1beb01c753f31542fc0acb62edb4c6d165fcc5b4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoBasic tablet support in xcb through XI2
Laszlo Agocs [Tue, 5 Jun 2012 13:04:02 +0000 (16:04 +0300)]
Basic tablet support in xcb through XI2

The Maemo-specific function have been renamed a bit to prevent them
clashing with the more generic stuff.

Task-number: QTBUG-25865

Change-Id: Id55693159e15d5a0c679546eb48308feb48acac9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqdoc: Report multiple topic commands as an error
Martin Smith [Thu, 28 Jun 2012 08:46:59 +0000 (10:46 +0200)]
qdoc: Report multiple topic commands as an error

Some documenters are using two topic commands in a single qdoc
comment. This is only allowed for \qmlproperty so that multiple QML
properties can be documented with a single comment. qdoc now reports
an error for all other combinations of multiple topic commands.

Task Nr: QTBUG-26345

Change-Id: I1f9a6d2502ccffa76c2d41f961be3750014a0a56
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoQNX: Make geometry changes sync to fix QWidget::showFullScreen()
Thomas McGuire [Thu, 28 Jun 2012 09:34:41 +0000 (11:34 +0200)]
QNX: Make geometry changes sync to fix QWidget::showFullScreen()

These can't happen async, as otherwise the geometry of the widget is
changed too late, having the effect that QWidget::show_sys() would
overwrite the window geometry again.

Change-Id: Id60d009867a5b282ac14c112c872af1075660732
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoQMetaType: Fix warnings about truncation from uint64 to int.
Friedemann Kleint [Thu, 28 Jun 2012 09:32:35 +0000 (11:32 +0200)]
QMetaType: Fix warnings about truncation from uint64 to int.

Triggers warnings with MSVC2010/64bit.

Change-Id: I90abdf4de416e0db554eb46e4b3cc7a0a38cb1db
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agofix QWidget::showFullScreen on Windows
Joerg Bornemann [Tue, 26 Jun 2012 12:56:31 +0000 (14:56 +0200)]
fix QWidget::showFullScreen on Windows

When calling SetWindowPos in QWindowsWindow::setWindowState_sys we must
inform the QWidget about the new size we have set.

Task-number: QTBUG-26226

Change-Id: I42b01125f50a94cdb97026c74f5445f9ff47d8ba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix configure.exe to build qmake before tests
Rafael Roquetto [Thu, 14 Jun 2012 14:17:11 +0000 (16:17 +0200)]
Fix configure.exe to build qmake before tests

qmake is needed by autoDetection()/tryCompileProject() to be able to build the
tests. This patch also add a new method - generateQConfigCpp() - which
generates qconfig.cpp, needed to build qmake.

Change-Id: Ic304a364a13a2b3c28433f2a299df222a56fed67
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFurther fixes to widget masking
Miikka Heikkinen [Wed, 27 Jun 2012 14:15:42 +0000 (17:15 +0300)]
Further fixes to widget masking

If mask was set to a widget before the widget was shown,
the mask was not applied.

Also, if toplevel widgets were set a mask in Windows, the mask was
applied to frame coordinates instead of client coordinates.

Ported relevant code from Qt4 to fix these issues.

Change-Id: Id6187cf4952b81b5b60c167e2fd284b7dc83ed9c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoMove QPlatformInputContextPlugin/Factory to QtGui
Weng Xuetian [Sun, 24 Jun 2012 11:16:21 +0000 (19:16 +0800)]
Move QPlatformInputContextPlugin/Factory to QtGui

PlatformSupport is no longer shared and there should be no plugin
factory in it otherwise it will break plugin loading.

Since PlatformInputContext is already in QtGui, so move QPlatformInput-
ContextPlugin/Factory to resolve the platforminputcontexts plugin
loading problem. And remove platformsupport-private dependency from
existing inputcontexts plugin.

Change-Id: If4cb766470b8f9c8b72157da86cb33b4e1ff09e3
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
12 years agoSet window's surface format to support alpha channel.
Gatis Paeglis [Tue, 26 Jun 2012 17:14:45 +0000 (19:14 +0200)]
Set window's surface format to support alpha channel.

Task-number: QTBUG-26114
Change-Id: I33f191373327832fb9d3054366412ec5be855cff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoMove the QDataStream operator<< for QPair to qdatastream.h
Thiago Macieira [Wed, 13 Jun 2012 19:26:20 +0000 (21:26 +0200)]
Move the QDataStream operator<< for QPair to qdatastream.h

QPair is small and is no problem to include from
qdatastream.h. However, including QDataStream from qpair.h means
including QIODevice and QObject too.

Change-Id: I344321e9f68438008ec329a165135c3a346c6058
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoClean up the use of QT_NODLL
Thiago Macieira [Wed, 30 May 2012 11:03:56 +0000 (13:03 +0200)]
Clean up the use of QT_NODLL

QT_NODLL is replaced by QT_STATIC, but the latter is implied if
QT_BOOTSTRAPPED is already defined. Therefore, simply remove the
QT_NODLL definitions.

Change-Id: Iac7ec0b494b7a78197c25d59547f45eaf92d7465
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoUpdate the macros for shared/DLL and static builds
Thiago Macieira [Wed, 30 May 2012 10:09:00 +0000 (12:09 +0200)]
Update the macros for shared/DLL and static builds

Up until now, we had a mess of different macros used for building
DLLs, for building shared libraries on Unix systems and for building
static libraries. Some of the macros were contradictory and did not
work. From now on, there shall be only:

 - QT_STATIC: indicates that it's a static Qt build and the export
   macros should expand to empty
 - QT_SHARED: indicates that it's a shared / dynamic Qt build and the
   export macros should expand to Q_DECL_EXPORT or Q_DECL_IMPORT,
   depending on whether the macro corresponds to the current module
   being built (the QT_BUILD_XXXX_LIB macro comes from the module's
   .pro file)

QT_BOOTSTRAPPED implies QT_STATIC since the bootstrapped tools link
statically to some source code.

QT_STATIC is recorded in qconfig.h by configure when Qt is configured
for static builds. Nothing is recorded for a shared / dynamic build,
so QT_SHARED is implied if nothing is defined. This allows for the
existence of a static_and_shared build: with nothing recorded,
defining QT_STATIC before qglobal.h causes the export macros to be
that of the static form. Linking to the static libraries is out of the
scope of this change (something for the buildsystem and linker to
figure out).

From this commit on, the proper way of declaring the export macros for
a module called QtFoo is:

    #ifndef QT_STATIC
    #  ifdef QT_BUILD_FOO_LIB
    #    define Q_FOO_EXPORT Q_DECL_EXPORT
    #  else
    #    define Q_FOO_EXPORT Q_DECL_IMPORT
    #  endif
    #else
    #  define Q_FOO_EXPORT
    #endif

The type of the Qt build is recorded in QT_CONFIG (in qconfig.pri) so
all Qt modules build by default the same type of library. The keywords
are "static" and "shared", used in both QT_CONFIG and CONFIG. The
previous keyword of "staticlib" is deprecated and should not be used.

Discussed-on: http://lists.qt-project.org/pipermail/development/2012-April/003172.html
Change-Id: I127896607794795b681c98d08467efd8af49bcf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoGet started with patching up the Qt GUI docs
Gunnar Sletta [Wed, 13 Jun 2012 19:45:44 +0000 (21:45 +0200)]
Get started with patching up the Qt GUI docs

Primary goal, make the front page of the Qt GUI module a bit more
clarifying and avoid downstream references inside the Qt GUI docs.

Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoInclude QScopedPointer in qsettings.h
Thiago Macieira [Wed, 27 Jun 2012 15:32:01 +0000 (17:32 +0200)]
Include QScopedPointer in qsettings.h

qobject.h includes it, but only if QT_NO_QOBJECT isn't defined. It is
during the build of the bootstrapped tools.

Change-Id: I8fc921fb17c283358af263a6932b763a21209d40
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodisabling largefile support for Win CE
Bjoern Breitmeyer [Wed, 27 Jun 2012 08:40:39 +0000 (10:40 +0200)]
disabling largefile support for Win CE

this was disabled before but
I2631ff687881278ba42edacd237a2130c103b69f
enabled it per default

Change-Id: Ic5a8e50d116cf6b15719668faf055967a6f34e06
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodoc: use correct snippet id for QObject::isSignalConnected
Kent Hansen [Wed, 27 Jun 2012 12:10:17 +0000 (14:10 +0200)]
doc: use correct snippet id for QObject::isSignalConnected

Copy-and-paste error; the doc was based on QObject::receivers.

Change-Id: I4f6ce716d388328e0345e8457cbc99fff323ce41
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agodoc: remove duplicate link
Kent Hansen [Wed, 27 Jun 2012 12:01:50 +0000 (14:01 +0200)]
doc: remove duplicate link

Since QStateMachine inherits QState, QStateMachine::finished() and
QState::finished() are the same thing.

Task-number: QTBUG-14553
Change-Id: I7df2f815be377c19aeee393e9a2ce124183dc5e1
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agodoc: add missing \sa tag
Kent Hansen [Wed, 27 Jun 2012 11:59:48 +0000 (13:59 +0200)]
doc: add missing \sa tag

Change-Id: I50580bfefdf556f116b7099946b047acd12d4563
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoRemoved flags from SSPI calls which prevented the NTLM authentication from working
Adrian Carpenter [Wed, 27 Jun 2012 12:17:31 +0000 (13:17 +0100)]
Removed flags from SSPI calls which prevented the NTLM authentication from working

Change-Id: I87b085442ef301d9d92def0608a8baaa330522e6
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFixed qsslsocket_onDemandCertificates_{static,member}
Rohan McGovern [Wed, 27 Jun 2012 23:11:08 +0000 (09:11 +1000)]
Fixed qsslsocket_onDemandCertificates_{static,member}

This test had been XFAILing since August 2011, but recently started to
XPASS, possibly due to changes in the SSL setup on the tested host
(qt.nokia.com).

Removed QEXPECT_FAIL and replaced qt.nokia.com with
codereview.qt-project.org as a host expected to have working SSL.  (If
SSL on the latter were broken, it would immediately be detected by
any attempts at git over HTTPS.)

SSL setup can be verified as working by:

  openssl s_client -CApath /etc/ssl/certs \
    -connect codereview.qt-project.org:443 </dev/null

Task-number: QTBUG-20983
Change-Id: I9b4146da6545ab4115d6308044b1d242dd52b7f9
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoWidgets: Apply masks to native windows only.
Friedemann Kleint [Wed, 27 Jun 2012 12:02:00 +0000 (14:02 +0200)]
Widgets: Apply masks to native windows only.

Do not go searching for a parent window handle in
setMask_sys() as this causes for example MDI areas
to set masks that show the child only.
Fix breakage introduced by 8e280d1e187b09651c7036bd76272342d52ce401 .

Change-Id: I57de41d16985ebc8d3fc81153a671f2e2807b1eb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
12 years agoQNX: Add support for window states
Thomas McGuire [Wed, 27 Jun 2012 08:38:13 +0000 (10:38 +0200)]
QNX: Add support for window states

Now QQuickView::showFullscreen() works as expected.
QQuickView has no fallback for platforms without window state support,
as opposed to QWidget.

Change-Id: I9c41fe563ea1f6d117eaebd3ea1db87465142b85
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoQNX: Flush after changing rotation
Thomas McGuire [Wed, 27 Jun 2012 08:52:41 +0000 (10:52 +0200)]
QNX: Flush after changing rotation

This fixes a painting glitch where the window would stay in the old
position with the old rotation until it got repainted.

Change-Id: Id9de256b525760e8b32e55a87549efeccca151e0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
12 years agoAlso use x11FilterEvent for auto repeat key in xcb.
Weng Xuetian [Tue, 26 Jun 2012 15:02:23 +0000 (23:02 +0800)]
Also use x11FilterEvent for auto repeat key in xcb.

filterEvent for QPlatformInputContext is already used for auto repeat
key, x11FilterEvent also need to be filtered.

Task-number: QTBUG-25795
Change-Id: I3db87fdffdb5b01404047e905793ae6e10bb1e90
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
12 years agoAdd const & to foreach 'iterators'
Albert Astals Cid [Sat, 23 Jun 2012 09:06:43 +0000 (11:06 +0200)]
Add const & to foreach 'iterators'

Change-Id: I8c0600dfd919f45d14a0011f2da9b9fe0b9a0df3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoDocument that the object of a plugin must be default-constructible.
Stephen Kelly [Tue, 26 Jun 2012 14:11:06 +0000 (16:11 +0200)]
Document that the object of a plugin must be default-constructible.

Change-Id: Iaaf56ec3bb0d2423c8ab5deb0627dc1357cee830
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRefactor the creation of imported targets into a macro.
Stephen Kelly [Sun, 24 Jun 2012 17:28:43 +0000 (19:28 +0200)]
Refactor the creation of imported targets into a macro.

This will make it easier to handle cases where the Qt installation
and the build do not match exactly. For example, on Windows, it
would be possible to do:

  ./configure -debug
  make
  make install
  make release
  make release_install

In which case, both debug and release libraries would be installed
even though it was only configured with -debug. On non-Windows, the
debug and release libraries would overwrite each other, so it is
not necessary to support it.

Similarly, we want to handle cases in the future where (on
non-Windows) both static and shared libraries would be
installed (again, not described with a single build configuration).

Change-Id: Ib7916c9664a0f72e40156a03bdfc79a4a6c24350
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoremove abuses of warn_msg()
Oswald Buddenhagen [Tue, 19 Jun 2012 10:39:41 +0000 (12:39 +0200)]
remove abuses of warn_msg()

this function is not meant to be used for debug statements

Change-Id: I84575e64814e2c9fd2e09c33fc680d0e6648f4ea
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoremove support for versioning qmake properties
Oswald Buddenhagen [Mon, 18 Jun 2012 11:57:39 +0000 (13:57 +0200)]
remove support for versioning qmake properties

the rationale is mostly the same as in 568e714fdf, plus the additional
point that the qmake version didn't change for a decade.
fallback paths for version 2.01a properties are provided.

Change-Id: I3d3f16595eca9eca71c78fda9dbaf53da9f874a9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agouse source root also for finding features
Oswald Buddenhagen [Mon, 18 Jun 2012 10:06:37 +0000 (12:06 +0200)]
use source root also for finding features

Change-Id: I108914c6d2c6d06414156584aeb3a1afb0f5838d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agomove cachefile_depth calculation out of project evaluator
Oswald Buddenhagen [Tue, 12 Jun 2012 18:15:41 +0000 (20:15 +0200)]
move cachefile_depth calculation out of project evaluator

it has no business there

Change-Id: I6d1a4b55b5acacc470cc109a6c69a907abbba312
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoremove possibility to request project recursion from within a pro file again
Oswald Buddenhagen [Fri, 4 May 2012 18:02:35 +0000 (20:02 +0200)]
remove possibility to request project recursion from within a pro file again

the feature was implemented for the abld/sbs2 generators only, and is
of course undocumented.

this reverts most of commit e795e61ef93f8080f9938ac49f2fca306644af85.

Change-Id: Ibd1726b036ce6c45f8e678ea996218f774f8aed2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agodispose of Option::host_mode
Oswald Buddenhagen [Thu, 3 May 2012 18:59:14 +0000 (20:59 +0200)]
dispose of Option::host_mode

it was used only for determining the path separator, so do that
directly.
the -macx option went bye bye, as it is redundant with -unix now.

Change-Id: Ib8344c042db56e05af75d263447311d4b43a3bf0
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agodispose of Option::shellPath
Oswald Buddenhagen [Thu, 3 May 2012 18:53:10 +0000 (20:53 +0200)]
dispose of Option::shellPath

use isWindowsShell() in the one remaining case.

Change-Id: I25eab398ef50df5a7f4ec808279b83ca900e3c58
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoassume windows shell iff dir separator is backslash
Oswald Buddenhagen [Thu, 3 May 2012 18:50:19 +0000 (20:50 +0200)]
assume windows shell iff dir separator is backslash

Change-Id: I411a4d6691e18b818ee7d1ced7f126f97af0902f
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoreduce a bit of code dupe while assembling feature search path
Oswald Buddenhagen [Fri, 27 Apr 2012 17:16:56 +0000 (19:16 +0200)]
reduce a bit of code dupe while assembling feature search path

instead of having a bunch of nested loops, collect into a temporary list
and process it at the end.

Change-Id: I97e5642f7e13f7c7b69eae00833e61cdf46a02ed
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agounset QT_MODULE_* after loading the module pris
Oswald Buddenhagen [Fri, 27 Apr 2012 10:17:21 +0000 (12:17 +0200)]
unset QT_MODULE_* after loading the module pris

abuses have been observed in the wild, so make sure these variables are
not available.

Change-Id: I502c3f5db7d341cf6a8bd2ec09e87f129da2fca6
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agopurge "dumping all variables" debug loops
Oswald Buddenhagen [Mon, 23 Apr 2012 17:31:02 +0000 (19:31 +0200)]
purge "dumping all variables" debug loops

the as-we-go dump is sufficient (and usually necessary to actually find
the problem). if only the summary is interesting, the -E option can be
used now.

Change-Id: I9e34c6db9dcb99b38013c4d0cb80b8cb88ca36b5
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agorepurpose deprecated -E switch
Oswald Buddenhagen [Mon, 23 Apr 2012 17:27:43 +0000 (19:27 +0200)]
repurpose deprecated -E switch

instead of dumping the variables as we are going, dump everything at the
end. this is potentially useful, as opposed to the previous
functionality which was redundant with -d.

Change-Id: Icf14703cb93e03f7079dfc0266b219ad9c902133
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agomake a bunch of functions const
Oswald Buddenhagen [Mon, 23 Apr 2012 15:06:58 +0000 (17:06 +0200)]
make a bunch of functions const

values() and variables() get both const and non-const overloads

Change-Id: Idfabea1acc488bf78f24edb831681ee07f0074c4
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoconst correctness for variables()
Oswald Buddenhagen [Mon, 23 Apr 2012 15:01:45 +0000 (17:01 +0200)]
const correctness for variables()

Change-Id: Id11453ccbae3ffa32580badadada945d342d727a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agodon't overuse variables()
Oswald Buddenhagen [Mon, 23 Apr 2012 16:08:16 +0000 (18:08 +0200)]
don't overuse variables()

Change-Id: Ib2da88e5e29c0bfecc39a9c06e82a34a4bd0b1e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomake magicValues() const
Oswald Buddenhagen [Mon, 23 Apr 2012 14:57:01 +0000 (16:57 +0200)]
make magicValues() const

the weird debugging feature is not used anyway

Change-Id: I07f481a94f2b2ab2a5b61270f0e00183cefd4cd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoconst correctness for values() calls
Oswald Buddenhagen [Mon, 23 Apr 2012 14:20:30 +0000 (16:20 +0200)]
const correctness for values() calls

Change-Id: I1476ae8d3fb7364686398c5650729dee94a8e933
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agodon't use backwards compat mapping for generator accesses
Oswald Buddenhagen [Mon, 23 Apr 2012 15:16:56 +0000 (17:16 +0200)]
don't use backwards compat mapping for generator accesses

we can rely on only user code needing variable mapping, so apply it only
in the evaluator.

Change-Id: I6fc58e7bcf24cf0fa8783d5341ab1e7b9f001c88
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agointroduce magicValues() function
Oswald Buddenhagen [Mon, 23 Apr 2012 13:07:44 +0000 (15:07 +0200)]
introduce magicValues() function

the only place where the two remaining magic values need to be
referencable is doVariableReplaceExpand(), so make a separate function
and use it only in that place.

Change-Id: I6e2fcfa3a4f16727d90ace56eb88fc99ef272ffc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomake $$PWD non-magic on read
Oswald Buddenhagen [Mon, 30 Apr 2012 13:04:01 +0000 (15:04 +0200)]
make $$PWD non-magic on read

like the other variables, we can just store it in the hash.

Change-Id: I49ad39dca8d498119b27f16ea4bdc44ae698d72e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoset $$_DATE_ only on project startup
Oswald Buddenhagen [Mon, 23 Apr 2012 12:47:34 +0000 (14:47 +0200)]
set $$_DATE_ only on project startup

this changes the semantics a bit - it will be the datetime of qmake
startup rather than the time a particular file is processed. i'd argue
that this is insignificant.

Change-Id: I75918967bef25038ce54aa81ab03c027384c0268
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agodeprecate $$IN_PWD
Oswald Buddenhagen [Mon, 30 Apr 2012 13:02:19 +0000 (15:02 +0200)]
deprecate $$IN_PWD

it suggests a symmetry to $$OUT_PWD which simply isn't there. the
shorter alias $$PWD is much more popular anyway.

Change-Id: Iefbfd56f1a3e526f15c9d6cd1bf59778be6f2f8d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agomake project-related variables non-magic
Oswald Buddenhagen [Mon, 23 Apr 2012 12:15:07 +0000 (14:15 +0200)]
make project-related variables non-magic

$$_PRO_FILE_, $$_PRO_FILE_PWD_ and $$OUT_PWD can be cleanly initialized.
no need for magic.

Change-Id: I2e339d17bae42ecb573c2f82c716f6be15a35b98
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomove initialization of $$TARGET to setupProject()
Oswald Buddenhagen [Mon, 23 Apr 2012 12:14:16 +0000 (14:14 +0200)]
move initialization of $$TARGET to setupProject()

that's what we have it for

Change-Id: Ib734b97d337a82c73b086dfeb2b263171f2a02b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomake $$TEMPLATE magic on write instead of on read
Oswald Buddenhagen [Mon, 23 Apr 2012 12:13:07 +0000 (14:13 +0200)]
make $$TEMPLATE magic on write instead of on read

Change-Id: I03a68993dd7d4488f8212132a9d492d135295b9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomake a bunch of invariant variables non-magic
Oswald Buddenhagen [Mon, 23 Apr 2012 10:06:59 +0000 (12:06 +0200)]
make a bunch of invariant variables non-magic

instead of resolving them on-demand, just initialize the value hash
with them. less magic and faster.

Change-Id: I28cb6c21ae6ae60a33734f62acdef0794420ba8f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agodon't make $$TEMPLATE_PREFIX available any more
Oswald Buddenhagen [Mon, 23 Apr 2012 10:58:17 +0000 (12:58 +0200)]
don't make $$TEMPLATE_PREFIX available any more

this is a purely internal variable. projects are supposed to
query $$TEMPLATE only.

Change-Id: I32a3aa7012a4fedcf6e77e2e1302ed978baac700
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomove initialization of numerous variables to spec_pre.prf
Oswald Buddenhagen [Fri, 20 Apr 2012 18:27:15 +0000 (20:27 +0200)]
move initialization of numerous variables to spec_pre.prf

this is cleaner by design and allows removing some hacks.

Change-Id: I3270195b5d62caa476ffde7c1e1ef43cec99c565
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>