Commit Graph

8698 Commits

Author SHA1 Message Date
Oswald Buddenhagen
3c2f56aaf2 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>
2012-08-07 16:40:07 +02:00
Oswald Buddenhagen
68cbeb59d9 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>
2012-08-07 16:40:07 +02:00
Oswald Buddenhagen
6e4ed714f1 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>
2012-08-07 16:40:07 +02:00
Laszlo Agocs
6292c51306 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>
2012-08-07 16:40:07 +02:00
Martin Smith
e361a3f178 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>
2012-08-07 16:40:07 +02:00
Zeno Albisser
9828dace05 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>
2012-08-07 16:40:07 +02:00
Thiago Macieira
41379f9580 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>
2012-08-07 16:40:07 +02:00
Thiago Macieira
1dca602122 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>
2012-08-07 14:32:51 +02:00
Marc Mutz
49278dc5a7 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>
2012-08-07 11:16:15 +02:00
Stephen Kelly
b84e180263 Avoid crashes when invalidating a proxy model filter.
Task-number: QTBUG-26107
Change-Id: I2df7ae6402136570c8469d3251edae6ca8290f1f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-07 11:15:55 +02:00
Stephen Kelly
b37849a5f5 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>
2012-08-07 11:15:55 +02:00
Kent Hansen
9a0b7348b3 Make QSignalSpy copy QVariant parameters directly
Previously, a QVariant parameter would be wrapped inside a new
QVariant, and you would have to cast the QSignalSpy's QVariant to
a QVariant to get the actual value. This behavior was unintuitive
and undocumented.

Check if the parameter type is QVariant, and copy it directly if it
is. This makes the QSignalSpy's QVariant directly usable (no need to
"unwrap" the value in user code).

Existing tests that use QSignalSpy together with QVariant parameters
(such as tst_QPropertyAnimation::valueChanged()) and do cast the
QVariant parameter to a QVariant, continue to work after this change;
this is because qvariant_cast<QVariant>() returns its input value
(unchanged) when the type is not QMetaType::QVariant.

Task-number: QTBUG-21645
Change-Id: Ibfb171edd60c0d3f7ca1d5419e5c5f3d0380d5b3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-08-07 11:15:55 +02:00
Marc Mutz
39c2fdd907 QWindowSystemInterface: fix mem leak and race
There was a race where QGuiApplicationPrivate::processMouseEvent accessed
QWindowSystemInterfacePrivate::windowSystemEventQueue without holding
QWindowSystemInterfacePrivate::queueMutex.

There was a memory leak where QWindowSystemInterfacePrivate::windowSystemEventQueue
would not delete events contained in it when it was destroyed.

Fix both of these by properly encapsulating the QList/QMutex pair
in a small class, WindowSystemEventList, that allows only properly protected access
to the internal QList and calls qDeleteAll() in its dtor.

Change-Id: Ifaa9968c9272096df2f7109a7a6cf1c8e5fa736c
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-08-07 08:53:42 +02:00
Stephen Kelly
4ec169a60f Use == for button flag test instead of &
QMouseEvent::button() returns Qt::MouseButton, not Qt::MouseButtons.

Change-Id: Ib5dc5b3998ed8f442c72e26d1aff62bc4ebcff71
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-07 01:01:53 +02:00
Thiago Macieira
0ec953c936 Remove extra Q_COMPILER_xxx defines from the MSVC section.
Those are defined below, after the list that describes the macros and
the papers.

Change-Id: I1f2df0e33c84eb17ebbb0147662f560defed182c
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-08-06 20:33:13 +02:00
Thiago Macieira
1adca80707 MSVC's throw() behaviour matches the C++11 noexcept, so use it
This allows code using methods marked Q_DECL_NOEXCEPT to benefit from
optimisations before MSVC supports the C++11 keyword. Even MSVC 2012
doesn't have it yet.

Using throw() in other compilers is not a good idea because they might
actually be implementing the C++ standard -- which is broken.

Change-Id: Id07ab4fe40a641583d5285d5abb536998bc419ba
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-08-06 20:31:38 +02:00
Thiago Macieira
38dc1f7597 Optimise QMutexLocker a little: don't call relock() in the constructor
QMutexLocker does not support being passed already-locked mutexes,
unless they are recursive mutexes. But in that case, it behaves as if
the mutex weren't locked in the first place.

Since that's the case, there's no point in testing the low bit to see if
it's set or not. It's never going to be.

Change-Id: Ie4b81f7e2cca16e6db36f3cb51a5377dbdfc157d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-06 20:30:04 +02:00
Sean Harmer
96bc8835eb OpenGL: Add finer-grained functionality checks for NPOT textures
The GL_IMG_texture_npot extension only provides partial support for
npot textures in that it allows use of npot textures but it does not
support the GL_REPEAT texture mode (needed for tiling fill modes in the
QQ2 image element).

Adding this new finer-grained feature check allows QQ2 to still use npot
textures where GL_REPEAT is not needed with only the IMG extension
present.

A follow-up commit will make a check for this in qtdeclarative.

Change-Id: Iff3dbdb955fb334d9e32f3abd49e90ff0ed9836c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-08-06 16:04:43 +02:00
Jan-Arve Saether
57265a20cb Make sure codecForLocale returns a valid codec in bootstrap mode
This was a regression caused by acbfb4d777,
causing for instance qdoc to crash.

Change-Id: Id8daa19d467c4f1729e5a5a203a388f16ec4a6de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-06 16:04:32 +02:00
Jerome Pasion
195663260c Doc: Adding a landing page for Qt SQL.
-Simple landing page which contains a link to the SQL guide and API.
-Gave a new title to C++ API page.

Change-Id: I54eca4f6933bafa0affd5825e7fe2e1a2522dad0
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-08-06 16:04:25 +02:00
Rohan McGovern
efdc35b680 lancelot: detect and handle Jenkins CI environment
Make the test behave in Jenkins similarly as it behaves in Pulse:

  - a test run in Jenkins is not an ad-hoc run

  - the JENKINS_HOME environment variable implies we are running in
    Jenkins

  - the GIT_BRANCH environment variable, set by the Jenkins git plugin,
    is equivalent to PULSE_GIT_BRANCH

  - there is no equivalent to PULSE_TESTR_BRANCH, since testr is no
    longer used

Change-Id: I89ffeec659b4adaab309d8b93ad793ce640029c7
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-08-06 16:04:22 +02:00
Joerg Bornemann
b170668bb8 fix maximize -> fullscreen -> maximize on Windows
Using a reference changes the value of oldState within this function,
which is undesired.

Change-Id: I9fb66e488015d6b3e586ffa2f0b05a40c095e16b
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2012-08-06 16:04:19 +02:00
Thiago Macieira
ba2c77f21a Fix builds with sysroot: a space is necessary before ] in scripts
When using [ ] for tests in shell scripts, the ending ] must be a
separate parameter. Otherwise, it won't work. configure was reporting:

  configure:5918: ']' expected

Change-Id: I38a843356ee0feb97edb8692a828306821045c77
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-06 16:04:17 +02:00
Mitch Curtis
1a7e1f6f9a Add missing const qualifier to snippet in QIdentityProxyModel doc.
Task-number: QTBUG-26751
Change-Id: Icb1f25dd015bcc62ec7c4c2b26c897649f1bbabb
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-06 16:04:11 +02:00
Stephen Kelly
e3c831fc81 Fix some documentation inconsistency in QtNetwork.
Change-Id: Id3e25480d4a8529813e02dc3d19f553a9263a363
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-06 16:04:09 +02:00
Martin Smith
7a64f2790e qdoc: Removed "../" from paths to images
qdoc was mistakenly assuming that the output
was going into subdirectories. The base dir
variable was not being tested.

Task nr: QTBUG-26638

Change-Id: I9b331926f8954b58102f75fad3f233eaebb2bb4d
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-08-06 16:04:06 +02:00
Rafael Roquetto
6f580d6a5a Fix qmake -project
qmake -project was always outputting a project with subdirs template, because
Option::h_moc_mod was not being properly read, causing addFile() to misbehave.

Change-Id: I2c07aea132f9885eabf188de993b0fabfb352886
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-06 16:04:03 +02:00
Mitch Curtis
1db721e51a Fix typos in qdatetime.cpp.
Change-Id: I1c2e3dafcca69590cd7a18fdf65e2c9083ba91b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-06 15:52:39 +02:00
Oswald Buddenhagen
5fae23eb26 introduce -fully-process configure option, change behavior of -process
configure will now run qmake without -recursive, as on modern systems
one can get a lot more out of parallelization done by make, which qmake
cannot do.
use -fully-process to get back the old behavior. -dont-process is
unchanged.

Change-Id: I2874321a963175463ae8992f3ab2b01bc13c9922
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-06 15:28:59 +02:00
Oswald Buddenhagen
051f97f350 remove phonon vestiges
Change-Id: Ifae2c631ddaae95ad9fc92e1f768fd910b254292
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-06 15:28:55 +02:00
Oswald Buddenhagen
a87006d4d2 remove -dsp & -vcp vestiges
only -vcproj is meaningful at this point

Change-Id: If727c96a9628e37a5a00a19a6eabede261c9c4b2
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-06 10:40:40 +02:00
Oswald Buddenhagen
f056602fa6 remove references to dead variables
Change-Id: I2603ebabbec5011fa0bf3e858401655a9a822768
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-06 10:40:07 +02:00
Oswald Buddenhagen
d0656e8bcf remove stray message
i think this was a vestige from the old wince build proces

Change-Id: I13305de627c65fc1c93ba6d2383557ff5ea7a147
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-06 10:38:46 +02:00
Oswald Buddenhagen
cd2a608cf6 remove stale messages about using setcepaths
Change-Id: I9c0a61254aa50e57b18718aa44935007fd25bd74
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-06 10:38:42 +02:00
Samuel Rødal
054645c846 Do not call markDirty() for hidden widgets.
Fixed crash when resizing a scroll area with a native viewport
(typically a QGLWidget) causes the scroll bars to get hidden, while
there are still expose events in the queue for the scroll bar widget.

Task-number: QTBUG-26746
Change-Id: Ia77c8eb32a6730670333120af3f9a772c64807f1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-06 03:21:38 +02:00
Samuel Rødal
e033d59c94 Fixed popups getting blocked by modal windows.
In the case of a file dialog with a completer, the completion list view
is a popup that is not a transient child of the file dialog. Thus it
ends up getting its blockedByModal flag set due to the file dialog
window being a modal window.

To prevent this we make sure popups don't get blocked by modal windows,
as they were special cased and processed before modal windows in Qt 4.x.

Change-Id: Id5688cfb1534541cd1678b1e53d75e34a68f9b8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-06 03:21:36 +02:00
Martin Smith
35215a0f5f qdoc: No longer prints namespace qualifier twice
enum values in the Qt namespace were being printed
as. e.g.: Qt::Qt::AlignLeft. This was due to the
presence of a collision node that was not handled
properly.

Task nr: QTBUG-26628

Change-Id: I54adaba72410b2838f0922f181846bb7e76b61d4
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-08-06 01:31:19 +02:00
Marc Mutz
9f006a863a Logging: mark qEmergencyOut() noexcept
This function is called in OOM situations and when other exceptions
are still in flight, so it really shouldn't throw, indeed.

Change-Id: I50cda699ffd74f3710c3bafd15af356ff410bc47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-06 01:31:14 +02:00
Frank Osterfeld
063e3a4da8 Fix intended assignment to customSet variable.
The naming suggests that this variable should be set to true here (instead of leaving the expression result unused). Also, the variable isn't written to anywhere else.

Change-Id: I8aae904f6e4456ce0bdd053ce89c2721168dccd3
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-06 01:31:04 +02:00
hjk
702788f4ad qdatetime: micro optimization in fmtDateTime
The function showed up in the profiler when doing
heavy logging involving timestamps in Qt Creator.

Change-Id: I81c4e22981a5de91df3da6a0f1df2a08552fa71a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-08-05 07:25:43 +02:00
Oswald Buddenhagen
b7db596590 use QMAKE_LIBDIR for passing LSB library path
-L in QMAKE_LFLAGS is just wrong

Change-Id: I05eae0bb5e5e3dc8f8234616cb2ccdfba1d517fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-04 08:15:46 +02:00
Oswald Buddenhagen
c37df22454 remove the option summaries from the configures' help messages
they are an unreadable and unmaintainable mess. the options are properly
documented below.

Change-Id: If2ec683fb7c3740b19798979f8a1f9cd8d84f457
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-04 08:15:40 +02:00
Oswald Buddenhagen
8f58c7c6ed s/QT_PRIVATE/QT_FOR_PRIVATE/
QT_PRIVATE is meant to be for something different.

only jsondb uses that so far. as it has little activity, i feel free to
break it temporarily.

Change-Id: Ifaa054af7234594ee534120c99506b76aebbf59f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-04 08:15:22 +02:00
Oswald Buddenhagen
e185f343e4 findLibraries(): don't remove -L options for system paths
the paths may be explicitly added before some other paths, so it would
be wrong to remove them.

Change-Id: I68ae93fd307afe14a07a0f24de952783950b5bea
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-04 08:15:18 +02:00
Sean Harmer
20b7f028cf XCB: Correction to OpenGL version check for profile support
Change-Id: I2f2bf877b1e2e628806f22fe66180b05090f4b3e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-04 02:58:02 +02:00
Oswald Buddenhagen
95d3380d22 introduce ability to selectively pass options to qdbusxml2cpp
DBUS_{INTERFACES,ADAPTORS} now also accepts "structures":

DBUS_INTERFACES += foo
foo.files = foo.xml bar.xml
foo.header_flags = -i qfoobar.h
foo.source_flags = ..

Change-Id: I98d757c8d3a3c6f79cedca7b90b533289114c102
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-04 00:52:46 +02:00
Oswald Buddenhagen
911516e1d3 add ability to pass command line options to qdbusxml2cpp
QDBUSXML2CPP_{INTERFACES,ADAPTORS}_{HEADER,SOURCE}_FLAGS are now
understood.

Change-Id: I26492cec5ecb7ff4a6b83755ee8a0c17859b2a68
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-04 00:52:42 +02:00
Oswald Buddenhagen
ff0a759f8d de-duplicate dbusadaptors.prf vs. dbusinterfaces.prf
it's two times the same code, once with "adaptor" (and an -a option) and
once with "interface" (and a -p option).

the de-duplicated code looks a bit nasty, as qmake cannot deal with
braces on the LHS yet.

Change-Id: I199a07947661ab9abe7a736b56c437f3f6dc4fa4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-04 00:52:38 +02:00
Thiago Macieira
5566254948 ICU: lock the mutex before calling an Unlocked function
The QIcuCodec::defaultCodecUnlocked function is not thread-safe
because it calls codecForNameUnlocked. In turn, that one accesses and
even modifies a QHash stored in the QCoreGlobalData singleton, which
is what makes it non-threadsafe.

In order to call the Unlocked function, we need to lock the mutex
first.

Change-Id: I915570110229f4c0929986aa26731244317ef6ab
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-04 00:52:18 +02:00
Thiago Macieira
4e542d958a ICU: Mark which functions are threadsafe and which ones aren't
Mark the thread-safe functions with the \threadsafe doc marker. This
includes public API, which should be thread-safe anyway.

The thread-unsafe functions are marked "\nonreentrant" already. In
addition, I renamed the functions that must be called with locked
mutexes to Unlocked, following the convention in other libraries like
libdbus-1.

Change-Id: Ibd93d1266149767f546c8e82959b73c138008469
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-04 00:52:14 +02:00