Commit Graph

11839 Commits

Author SHA1 Message Date
Samuel Rødal
c7191d3e21 Fixed artifacts when drawing same line with different clips.
Expanding on the change fixing QTBUG-24762 with the realization that any
line needs to be drawn in a consistent way regardless of system or
painter clip, not just dashed lines.

Task-number: QTBUG-25036
Change-Id: Ief7ef19cc92c52e7d792500a581a072ba032767e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-14 12:37:20 +01:00
Oswald Buddenhagen
97be79012c clean paths of found files in prepareProject()
any of the directories may be the root, which would lead to double slashes
in the constructed filenames.

Change-Id: I053e167a19b795b40e780fc29db356c7f24d286a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 18:55:53 +01:00
Oswald Buddenhagen
dd06f991af actually use the temp variable we just assigned ...
Change-Id: I535a4bfc268a07d6b1813e47cdae862e5e459efc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 18:54:59 +01:00
Oswald Buddenhagen
64d03e1c34 do not append a trailing slash to output directory
it's entirely counterproductive and confuses the subsequent code.

Change-Id: Iadcfd2af80acd2d7ed50807b3e001e26d83075a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 14:08:27 +01:00
Mitch Curtis
c1771a78ed Correct QString's warnings involving QRegularExpression.
Replaces "QRegularExpresssion" with "QRegularExpression" and adds some
auto tests for the warning itself.

Task-number: QTBUG-30054

Change-Id: Iba333a4388795eccca809fb430c295f503794263
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-03-12 11:43:01 +01:00
Mitch Curtis
6bc691dde5 Revert 6497649730 and clarify docs.
It introduced a regression by requiring that a p/P was also present:

QTime time = QTime::currentTime();
qDebug() << time.toString("h:mm:ss a");
// Outputs "10:05:42 am" in Qt 4.8.
// Outputs "10:05:42 a" with 6497649730.

This patch also clarifies the QTime::toString(QString) documentation.

Change-Id: I4d73a959c2ca76304f03a4ce9717b540ad4e8811
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-03-12 11:43:01 +01:00
Kai Koehne
124da59cb4 Fix static builds with ICU
Make sure we actually link against the static version of the ICU libs for
static builds.

Task-number: QTBUG-29478

Change-Id: Ida7b439f11c5393bee43bfe804f9ec84bf272b34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 09:07:38 +01:00
Samuel Rødal
a12f6ba302 Fixed dashes being rendered differently depending on system clip.
We need to clip lines to the unclipped device rect in the case of
dashing, since otherwise the dashes will be shifted and rendered
differently when partial repaints are done.

Task-number: QTBUG-24762
Change-Id: I3599b54baa552acc20bf8cc2e12f846b45f6019e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 02:54:08 +01:00
Samuel Rødal
7128bcbbd5 Attempt to stabilize tst_qgl::graphicsViewClipping().
Make sure the graphics view is exposed and has been painted before
trying to grab the framebuffer.

Task-number: QTBUG-29943
Change-Id: I2945cb78b58265864744a0d5fc99fb430306b578
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 00:45:04 +01:00
Mitch Curtis
a8c6708260 Correct QLocale(const QString &) documentation.
Change-Id: I6430ff2636083204fa12437980626260f848e269
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-07 00:44:21 +01:00
Oswald Buddenhagen
3f5633bc25 remove some cryptic code relating to output directories
the purpose of it is truly elusive - the output directory is maintained
by the surrounding code anyway.

Change-Id: Id1a481d85a7b83ab0676ef650c900414d0ba83b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-07 00:42:56 +01:00
Gabriel de Dietrich
083c8ce840 Cocoa: Pick right rectangle when rendering window mask
Ususally, the object setting the mask knows better than the window,
since the latter may not have had its size set by then.

Task-number: QTBUG-29856
Change-Id: Ib24d452a98a76b57f5d9236d5fa1ba4755cf0840
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-06 20:07:41 +01:00
Gabriel de Dietrich
544f1cbe27 Cocoa: Fix shadowless popups
The window shadow was never invalidated after setting the transparency
mask. We now do it right after the first draw after setting the mask.

Change-Id: Icc5c6002d25abeb25d58ee4d1f868e928121ae9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-06 20:07:41 +01:00
Mitch Curtis
5a83785567 Correct sentence in QNetworkProxy::setApplicationProxy() documentation.
Change-Id: I46fa7f814901cbe6a1f8f003f461bf1eee6f8bde
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jonas Gastal <jgastal@gmail.com>
2013-03-06 18:01:13 +01:00
Oswald Buddenhagen
b4d3047422 require modules to define their version
otherwise they would inherit it from qtbase, which may effectively
result in a lie if building against a different release.

for convenience we define the version centrally per repo.
qtbase is special, in that we use the version defined in qglobal.h to
avoid defining it redundantly (the instance in qglobal.h is currently
needed to bootstrap qmake; the configures would need some work to change
this).

Task-number: QTBUG-29838
Change-Id: Ie9a5b0ff0d64b69ff2d34af2f7c42d6278e957cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-06 18:01:13 +01:00
Samuel Rødal
711773776e Fixed potential access violation in QPixmap::copy() for <32 bit pixmaps.
QImage is supposed to maintain the invariant that each scan-line begins
on a 4-byte boundary, so we need to verify that this is the case before
using the optimized path of short-cutting QImage::copy() by referencing
the source image's bits directly.

Task-number: QTBUG-14766
Change-Id: I0a178aeb2f34cc64f98deae9470b55b5c53fcb06
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 15:00:35 +01:00
Morten Johan Sørvig
7ee4ab1463 Cocoa: Improve expose event handling.
Send expose events on window and view show/hide
notifications. Implement QCocoaWindow::isExposed.

Close all windows on quit. This allows sending (de-)expose
events for those windows while the event loop is running.

Remove the flushWindowSystemEvents call in setVisible.
This function is called from application code. Flushing
window system events here is wrong since it can lead
to events being processed in the middle of the user
code call stack. flushWindowSystemEvents should only
be called as a result of (native) window system activity.

Skip one of the tst_qtooltip tests which becomes unstable/
fails in the CI system as a result of this change.

Task-number: QTBUG-29583
Change-Id: I3fb8b3f77e2b2e19dfeafba5d7dfcef602891d37
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 11:43:22 +01:00
Mitch Curtis
a65982d659 Add snippet for QT_VERSION_CHECK.
Change-Id: I048771f21ce694329a7e9acd4dbfbebfec964b05
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-27 12:02:34 +01:00
Andy Shaw
4a6a066df2 Fix generation of XCode projects for XCode 4.6
When a framework is referenced in the XCode project then it is known as
a framework by the lastKnownFileType and not the reference type. This
ensures it works in both XCode 3 and XCode 4.

Task-number: QTBUG-29371
Change-Id: I434246a46d6c5bfd50ba7de1a7c710c0caf0bc0a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 12:01:28 +01:00
Mitch Curtis
6269c9a414 Fix some punctuation errors.
Change-Id: I6aa2ad2b506466fbef6a22380d151988930807c9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-27 12:00:46 +01:00
Friedemann Kleint
2bab4a6552 Fix Qt Designer warning about being unable to handle property.
Qt Designer warns:

"The property "document" of type 1053 (user type)  is not supported yet!"

when loading forms containing a QTextEdit.

Introduced by 468c22f673 .

Change-Id: Ia1b7bdc9f7188e0b092c010056fcd12c9e891fd7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-02-26 10:47:45 +01:00
Venugopal Shivashankar
f28b6f8453 Doc: Added the missing example snippets
The snippet files referred were outside the scope exampledirs for
QtCore. I made of a copy of those files in the snippets folder to
fix this issue.

Task-number: QTBUG-29755
Change-Id: I2f765104394071d035e9cee610945ae290033deb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
2013-02-26 10:45:59 +01:00
Eskil Abrahamsen Blomfeldt
a00e74914c Remove extra $ in default libexec directory
Produces qt_lbexpath=$PREFIX/29677QT_INSTALL_LIBEXECS_DIRNAME
in qconfig.cpp

Change-Id: Ie6f208d759a748dfcd4f1547943a1dfb4b7aedd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-25 07:25:06 +01:00
Frederik Gladhorn
395f00ae18 Remove debug output that can cause crashes in static builds.
Currently static builds ignore the accessibility plugins.
The debug output would also potentially crash for
other events when they could not create interfaces.

Task-number: QTBUG-28707
Change-Id: I5ae20cac89bd7f4a74add2b80834f4e9d4fa438c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-02-25 07:25:06 +01:00
Stephen Kelly
d7ae34fdfd List the Release library before the Debug library in cmake files.
This way, the Release library is chosen if Qt is configured to
build both debug and release, and if the consumer configuration
is not an exact match for 'Debug'.

This means that RelWithDebInfo and MinSizeRel, which are 'standard'
configurations in CMake with mulit-configuration generators, will use
the Release version of Qt. All other configurations will also use the
Release version, unless MAP_IMPORTED_CONFIG_<CONFIG> is used as
described in:

 http://doc-snapshot.qt-project.org/5.0/qtdoc/cmake-manual.html

and in the cmake documentation:

 http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:MAP_IMPORTED_CONFIG_CONFIG

Task-number: QTBUG-29186
Change-Id: Ifc11a9e19fcb304297c204e34a3b25c510329767
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-22 08:27:01 +01:00
Stephen Kelly
7661e39c02 Create module-specific internal cmake macros
This ensures that invoking the macro from a different module (operating
on a different target) is not possible.

Change-Id: Idbcd41d03172a8f1dcea26954464ab981fce8879
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 22:41:14 +01:00
Stephen Kelly
7477d50fce Populate the cmake variables only one time.
Since we're only including the Extras file one time, invoking set() for
the include dirs again will overwrite the addition of include dirs in
the extras file.

We only need to populate these variables if not set anyway, so do that.

Change-Id: I04dad0674778e79c8c12c18231b8ce6c92edf881
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 22:41:05 +01:00
Cyril Oblikov
057fabab7c Hiding scrollbar on MacOSX 10.7 if policy is set to ScrollBarAlwaysOff
On Mac OS X 10.7 (if System Preferences -> General -> Show scroll bar is
"When scrolling") scroll bar was shown even if policy was set to
ScrollBarAlwaysOff.

This is a regression from 5.0.0.

Change-Id: I161b350874c085a1397df7b398af8f3fb0fbeacf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-21 17:44:27 +01:00
Olivier Goffart
b05f19f232 moc: Fix infinite recursion in macro substitution
When performing macro argument substitution, one should keep the set of
macro to exclude, else we can enter an infinite recursion.

Testcase:
 #define M1(A) A
 #define M2 M1(M2)

Task-number: QTBUG-29759
Change-Id: I564bbfed65e1c8599592eaf12c6d67285d2fd9ce
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-02-21 16:55:41 +01:00
Thiago Macieira
ec166aaa70 Add qcore_mac_p.h to the list of headers.
Change-Id: I3a8db99166a34c15c19b142a05bf81ababb2eeb8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-21 08:18:47 +01:00
Albert Astals Cid
70f6652ebd Forward the 3rd parameter of dataChanged
Change-Id: I94f893bf65cd150c3cb1099c91cb13882bcca79a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 00:58:32 +01:00
Albert Astals Cid
20dbad1bbf Emit which role actually changed
Change-Id: I596a81628e5553779986a94769e114d89a44b264
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 00:58:25 +01:00
Topi Reinio
c816a338f7 Doc: Update image in QPainter class reference docs
The code snippet demonstrating the use of drawText() was already
updated to use the text 'Qt Project' - update the image accordingly.

Task-number: QTBUG-29784
Change-Id: Iea5e729bd26df2d8ab6a02bb7ea804494e554a28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-20 21:14:24 +01:00
Martin Smith
2cb22c6cc0 qdoc: QML Inheritance is not resolved correctly.
This change adds some QML property, signal, and method
data to the .index file. It also provides more robust
resolving of QML inheritance for qml types.

Task-number: QTBUG-29778
Change-Id: Iaefd64227913a19f427b21e904ca5e32c82d7b29
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-20 17:22:26 +01:00
Jędrzej Nowacki
dacc222d5a Fix QVector detaching in one thread while another destroys it.
The patch adds handling for a case when a QVector is shared between two
threads. In such scenario detaching in one thread could collide with
destruction in the other one, causing a memory leak or assert in debug
mode.

Task-number: QTBUG-29134
Change-Id: Idbff250d9cfc6cf83174954ea91dbf41f8ea4aa4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 15:22:55 +01:00
Jędrzej Nowacki
d3a4230757 Make QVector instances counter thread safe
Change-Id: I7c7aa1eb0f8e91c43023882a3734e908be4ba4fe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
3fdfde294f add -skip option to the configures
this makes it possible to exclude modules from the build without moving
their sources out of the way. substitutes the much-requested -no-webkit.

not adding a symmetrical option, as it is relatively pointless:
to build only specific "leaf" modules, you only need to run
"make module-qt<module> ..." once you configured. and removing
particular "intermediate" modules is achieved with this very option.

Task-number: QTBUG-26697
Change-Id: I25cebdbd029885a2c653c4cde696f9bb78691768
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
23762682c1 simplify qtAddModule() by using $$qtPlatformTargetSuffix()
Change-Id: I02b6c1eb2db0c8a36c50b1ec3c79dea215fba03a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
67f20d66e4 remove pointless conditionals and expansions from qtLibraryTarget()
this function is called only from library TEMPLATEs, and always with
exactly one word as the only argument.

Change-Id: I6282e3826791f89e6cf89dde625c8166e4e56028
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
218179ce2f don't suppress building examples in non-prefix builds
these have no (useful) install target, so it makes no sense to reduce
the "build" to installing sources. suppressing the actual build can be
achieved with -nomake examples instead.
conversely, as the build dir is the install dir, people actually need to
be able to (selectively) build examples in there.

Task-number: QTBUG-29756
Change-Id: I98f34235442b552e51c0d5f5cec96a3eab4f1e7f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
0444115211 fix libexec configure.exe status line
Change-Id: I22b4c07a3d39ab2f3288d0872a0ccaff45b0c153
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Topi Reinio
a595ac15cd Doc: Document example manifest files in QDoc manual
Adds documentation for example manifest files and the related qdoc
configuration command \manifestmeta into QDoc manual.

Change-Id: I6a627698ab14f57c9a117b6d4b794f352959f5ac
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-20 15:22:55 +01:00
J-P Nurmi
c90626f189 QMacStyle::drawControl(CE_ProgressBar): add missing null pointer check
Do not spin off progress bar animations if QStyleOption::styleObject is not set.

Task-number: QTBUG-29748
Change-Id: I4e17a4892e82cae48250afa7a270b15ca5730f46
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-20 13:00:22 +01:00
Matt Fischer
fcef9b4252 Fix generated pkg-config files when cross-compiling
The Libs: line of the pkg-config files is constructed
by taking the name of the .pc file itself, and stripping
off the path and extension.  However, the code which does
this does not handle path separators correctly when the
target OS and local OS are different.  To get around this,
the custom string manipulation was replaced with a call
to QFileInfo::completeBaseName(), which can handle the
different path separators correctly.

Task-number: QTBUG-29700
Change-Id: Ia817b415d303b249f56fcc3d1f073cae99c43046
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 12:59:55 +01:00
Jan Arve Saether
7508719830 Avoid potential crash when changing styles with stylesheet
This is not always reproducible, but it probably crashed because
QStyleSheetStyle::polish() can do some nasty things such as creating
and deleting objects, which can leave the list with dangling QObject
pointers.

However, it should not delete QWidgets, so we make sure we only have
a list of QWidgets before we perform the polish iteration.

Change-Id: I84c1ca6a7316e72348248ff056b65dcbae3d20a3
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-20 12:59:55 +01:00
Friedemann Kleint
b6ccdfa482 Fix multiselection by CTRL-click in QFileDialog/KDE.
Task-number: QTBUG-29257

Change-Id: Idfac80e855455a4537dd38a23136762cd9398e15
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-20 12:59:55 +01:00
aavit
e28c03cb82 Fix reentrancy problem in image reading
There were race conditions when accessing the plugin factory and
the image reader plugins from different threads; ref QTBUG-29281.
Added a mutex lock to avoid.

Change-Id: Ic1a3b6cbaf5603f1bcf7025b58247a9a3f6d08a9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-20 12:59:55 +01:00
Indrajit Tapadar
f6c5452d97 Fix for url encoding in QDesktopServices::openUrl().
URLs containing spaces (encoded) couldnt be opened using QDesktopServices::openUrl() -method.
This is a regression as it works for 4.8,

Using url.toEncoded() instead of url.toString() which removed percent encoding.

The NSUrl uses RFC 2396 for parsing, and according to the documentation,
of 2.4. Escape Sequences - Data must be escaped if it does not have a
representation using an unreserved character;
And as a space does not have a representation using unreserved character it needs to be
escaped.

Example: Using this url, http://www.google.com/search?q=testme%20withspace
url.toString() returns  "http://www.google.com/search?q=testme withspace"
and url.toEncoded() returns, http://www.google.com/search?q=testme%20withspace" which is
also the expected result.

Task-number: QTBUG-29124
Change-Id: Ieed3d4cfb689b9311f6cf21e5098a1e70256ab03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 10:35:23 +01:00
J-P Nurmi
3bee02c1ca Revert "QGtkStyle: GTK3 compatible combo boxes"
This reverts commit 15fc255c7c.

The change was not compatible with the oxygen-gtk theme engine.
Furthermore, GTK3 compatibility in QGtkStyle is not important,
since it won't be feasible to support both GTK2 and GTK3 in
the same style implementation.

Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	src/widgets/styles/qgtkstyle_p.h

Task-number: QTCREATORBUG-8524
Change-Id: I8ea6dcfd1f432d51b306a5d9f6c4106137979c5a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-20 10:35:23 +01:00
Samuel Rødal
c85f6d9f5a Fixed qtbase examples build when configured with -no-opengl
Change-Id: Idafdc3264f760d6400ce04bb9da36289b1f96438
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-20 10:35:23 +01:00