Commit Graph

15065 Commits

Author SHA1 Message Date
Stephen Kelly
0771075f66 Move the preprocessor iterator for Qt smart pointers with the others.
Use it to forward declare the types.

Change-Id: I48d9e32dcf02471d197a82502d96d60807d11d57
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 16:18:41 +02:00
Stephen Kelly
15a17323ed Make the automatic 1arg and 2arg metatype macros work with namespaced Qt.
Change-Id: I64aa3cacd0cf57235ad43f089716765b384ef412
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 16:18:37 +02:00
Stephen Kelly
2ff15ff065 Fix the automatic declaration of smart pointer types.
Before this patch,

 qRegisterMetaType<QSharedPointer<double> >("QSharedPointer<double>")

without a metatype declaration fails to compile, whereas it works
with Qt 5.1 (ie, before commit e9a69c3ba9)

Change-Id: I9408f711c9df810ff29b879b7696dab81c1160f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-06 16:18:32 +02:00
Friedemann Kleint
87ff0af425 Windows: Added support for large icons to QFileIconProvider.
Added code using image lists to windows theme.

Initial-patch-by: Max Desyatov <max.desyatov@gmail.com>

Task-number: QTBUG-4970
Change-Id: I6e82f4edec60e456d0b1759bb1771955edb94491
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-09-06 12:50:57 +02:00
Giuseppe D'Angelo
6c88be2af2 Remove qFind usages from the XCB plugin
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Ieccef12c617276d0526ce2876fd76e37b4240a43
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 09:12:36 +02:00
Giuseppe D'Angelo
fdbabc4f03 Remove qSort usages from the Cocoa helpers
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I482ce9320c07458a9f76df5823f17d53beec00d8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 09:12:33 +02:00
Thiago Macieira
2dfbf1bf03 Remove unused check_gradient function
Found by ICC 14. I wonder how the other compilers didn't detect it.

qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced

Change-Id: Ie94c04f1734e6d7bab6b540d763bb6e7c16e4cb9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 01:53:51 +02:00
Thiago Macieira
bb419ad87c Fix new change-of-sign warning detected by ICC 14.
qpainter.cpp(1656): error #68: integer conversion resulted in a change of sign
          tmp->changeFlags &= ~(QPaintEngine::DirtyClipPath | QPaintEngine::DirtyClipRegion);

tmp->changeFlags is uint, but QPaintEngine::DirtyFlag is backed by
int. That means the bitwise NOT sets the sign bit, which makes it
negative.

Change-Id: Id8dfc2c7012b519cc5f5799d223cb95a79ccd401
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-06 01:53:47 +02:00
Thiago Macieira
676ce97c8c Add C++11 features supported by the Intel Compiler 14.0
Change-Id: Ib9789223d487c29c5ce0830afa1f74b66ea6adfe
Reviewed-by: Guillermo A. Amaral <gamaral@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 01:53:42 +02:00
Giuseppe D'Angelo
57b88247b6 Remove qSort usages from QtDBus
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Ibd471d5dd7cda878d0fb71202468a7ccfa5d5046
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-06 01:53:31 +02:00
John Layt
4f170d0f39 QDateTime - Documentation clean-ups
Clarify the documentation with regard to what locale is used for names,
fix missing hour, timezone and am/pm format code details.

Change-Id: Ic2d507a89a005427bba0df6368364b47bcf58756
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-06 01:53:16 +02:00
John Layt
61b56a89a1 QDateTime - Clean up Qt::DateFormat formatting and parsing
Clean-up the implementation of toString() and fromString() methods in
QDate, QTime and QDateTime code to be more consistent in ISODate and
TextDate behavior, especially when handling TimeSpec.

Reformat some code so all methods are consistent in appearance and
function to make maintenance easier.

This changes some corner-case behavior in TextDate and ISODate, but
this either fixes bugs or makes the behavior match the documentation.

Change-Id: I457aa1d7cd4f448cd9f8a2e80ec635f3cb98e58c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-06 01:53:11 +02:00
John Layt
8b02a62685 QDateTime - Remove incorrect year range check
The limit on formatting a year outside the range 0 to 9999 only applies
to Qt::ISODate formatting, not to general date formatting.

Change-Id: Ifc971961412c190d721f23627982283e13d526b6
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-06 01:53:06 +02:00
John Layt
35af88b37e QDateTime - Switch to using the QLocale date formatter
Switch the implementation of toString() methods in QDate, QTime and
QDateTime to use the QLocale formatter, and remove the now redundant
QDateTime formatter.

Change-Id: Ie4f17c8a6e31acde3ce066f19835bb2b83351ce8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-05 23:20:09 +02:00
John Layt
dd488bb7a4 QLocale - Improve date formatter
Modify the QLocale date formatter to be consistent with the QDateTime
date formatter and able to replace the QDateTime formatter in a
subsequent change.

Fix the treatment of negative years.

The internal QLocale::timeZone() has been replaced by the
QDateTime::timeZoneAbbreviation() to ensure the correct tz for the
date/time is used rather than always the current system default.

Change-Id: I2ef26700856e2e69b979069226aa504ecbb50071
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-05 23:20:09 +02:00
Giuseppe D'Angelo
ad83be2cd3 Remove qFill from the Windows XP style
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Ia5d4a6604a1ec8998d6cb4f03b4c0669a3d6b23f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-05 23:20:09 +02:00
Giuseppe D'Angelo
1b28e7838d Remove qFill from the Windows platform plugin
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I777fc28857cc104fcd2b6c313a2840b697361be9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-05 23:20:09 +02:00
Giuseppe D'Angelo
aa3f358d43 Remove deprecated QtAlgorithms calls from QtGui
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I324ddf6129fe8884ecea97ef47abb7c071dfb34c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-05 23:20:09 +02:00
Oswald Buddenhagen
50a8a5e795 add QProcess::InputChannelMode
this enables forwarding standard input from the parent process.

Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-09-05 21:17:44 +02:00
Oswald Buddenhagen
fba0a30791 add QProcess::Forwarded{Output,Error}Channel
Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 21:17:39 +02:00
Oswald Buddenhagen
dd9d6b3d5b make the pipe setup code less convoluted
Change-Id: Ied870c892cc3dbbf24a3d9416f685e51a74e5c17
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2013-09-05 21:17:18 +02:00
Oswald Buddenhagen
4e5c2834a2 never create a console for command line tools launched from gui apps
commit 219b0d217 fixed forwarding of stdio to a console. unfortunately,
it also forced the creation of a console in the first place if there was
none, which is not part of the contract.
instead, give the child process a window (== console) only we we already
have one. this can be done irrespective of our channel mode, which has
the nice side effect that an explicit redirection to a console would now
also work.

Change-Id: Id25cab5da1ac1cc8ce452127ff95bac8d0a0fea8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2013-09-05 21:17:03 +02:00
Stephen Kelly
21fd5baf80 Add source directories to include paths if needed.
Task-number: QTBUG-33145

Change-Id: I555064cd92691459222463df9917f8222e31323b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-05 17:50:20 +02:00
Giuseppe D'Angelo
a78699e7f3 Remove qSort from QtWidgets
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Iec5c10fc4c3b4e684b51f6223bf3cb56acc42b58
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-09-05 17:47:15 +02:00
Giuseppe D'Angelo
c6d3fa1dcf Remove deprecated QtAlgorithms calls from the compose inputcontext
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I75ecfb84befd5dcc44f2ffcbef2cb6f1cc39cfd8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 17:46:27 +02:00
Friedemann Kleint
62533768c8 Change QXcbConnection::atom() to be inline.
Change-Id: I88b5b2527808f7c603c5a041df9c8c9e8031a608
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-09-05 16:47:11 +02:00
Stephen Kelly
239fe290ad Center the QColumnView on-screen, in case that helps avoid the test failure.
Task-number: QTBUG-32927
Change-Id: Icf0301d583b2ca6e2e099a19eb1f91feac1fb975
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-05 15:26:44 +02:00
Martin Smith
f029564607 qdoc: Removed declared but undefined member function
The declaration for addToQmlModule() in class Tree
is removed.

Task-number: QTBUG-33350
Change-Id: I2278a67cd6daf0e7723b4bf6d33ff9ed33cf9266
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-05 14:46:09 +02:00
Giuseppe D'Angelo
d757b5251f Remove deprecated algorithms usage from itemviews
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I68efdd1b08b94a737345644a5b588ffff5caac63
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-09-05 14:45:38 +02:00
Friedemann Kleint
1a844db508 Fix warning about unused variable.
Change-Id: I557785911073a35100902aa631fcef81133615cc
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-05 14:43:34 +02:00
Oswald Buddenhagen
ac327aa3af the condition for building the x11 offscreen plugin is ... having xlib
Task-number: QTBUG-33240
Change-Id: Idc96239b0bcbe98d1519c239600aebcda42e8818
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-05 13:06:18 +02:00
Oswald Buddenhagen
5ca5f4d344 build glxconvenience also without Xrender
it contains #ifdefs for that, no need to disable it completely.

Change-Id: I4a7d03e09fefded966e2c3fec58a470b4f1d3300
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-05 13:06:14 +02:00
Stephen Kelly
f69ace7341 QVariant: Make it possible to extract a QObject* from a wrapper without conversion.
Change-Id: I3a054d87d12e08d72dd4c77b6d467dc63f9a2231
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 13:01:46 +02:00
Stephen Kelly
d1a8623ecb QVariant: Don't crash when doing user-defined conversion to QObject*
The destructor of the ConverterFunctor calls unregisterConverter. If
the instance is static (as it is in qmetatype.h), then this method
can be called after the QGlobalStatic has already been destroyed.

Change-Id: I33b70734cbe09dfa888e887280c349e43ad1b855
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 13:01:39 +02:00
Stephen Kelly
cc594d2064 QVariant::canConvert: Use the old type when checking for QObject* conversion.
Change-Id: I8450c74ecfdeee96e73b82438c5ef83c3acf4444
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 13:01:33 +02:00
Stephen Kelly
e9a69c3ba9 Simplify the smart pointer metatype template
Don't use ## concatenation to create an identifier. That won't
work for types in namespaces:

 Q_DECLARE_SMART_POINTER_METATYPE(QtPrivate::FutureSmartPointer)

Change-Id: I876ea93d817724005efc28413f09c01623c2a7a1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 13:01:27 +02:00
Jerome Pasion
3062cea229 Doc: Get QDoc to list the QT variable for namespaces.
Task-number: QTBUG-32172
Change-Id: Id774b5d5036661a6f6b56b9c68f089031288eacc
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
40925fe74a fix warnings - qprocess needs a qcoreapp instance
Change-Id: Icf36c2e76595d8f2ed470da13e78c465cfa962f9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
78d6c9c002 remove redundant forwardedChannels() test
forwardedChannelsOutput() actually tests forwarding. also having the
older test only eats CPU cycles.
rename the new test to the old name for clarity.

Change-Id: I16a326c8692bb594d7df7897bc53d31b23c66d90
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
4028f54213 make error reporting in forwardedChannelsOutput test more useful
Change-Id: I0350ddfd6740d2a2cd3e0f49220cdaa83b854abf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
60f8b2f4d0 micro-optimization/-clarification
close stdin and let the process finish right away instead of first
waiting for a reaction (which is not supposed to come) and then
finishing.

Change-Id: Ifcf200eead5ed95217843e105f9d2dbb5398d646
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
60faa0f70b remove redundant condition
ForwardedChannels implies that both stdoutReader and stderrReader are null.

Change-Id: I9d5f02d3a1eac62316a6016b90c612d716ecaafc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Gunnar Sletta
0cf79e47da Remove undesired pixel padding of glyphs on windows.
The excessive padding has serious performance implications throughout
Qt and need to go. The original reason for having them was to fix
issues with GL text rendering and issues with unspecified OpenType
fonts. There have been several other changes to the glyph cache
since then and neither of the issues can be reproduced today.

Change-Id: I6de67598a079c296daf48be07cc5c2d67768c384
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-05 09:48:22 +02:00
Gunnar Sletta
35bc3dc45a Rely solely on alphaMapBoundingBox in QTextureGlyphCache
We're currently adding a lot of transparent pixels to the cache,
wasting both memory and cpu cycles while drawing. AlphaMapBoundingBox
was introduced to return the exact same bounds as the alphaMapForGlyph
function so we should only rely on this instead of adding arbitrary
padding and margins all over the place.

Windows still has an arbitrary +4 in the its drawGDIGlyph() which
means batching will not work on windows, but at least now
other platforms do not need to suffer.

Change-Id: I714903fa195004400c09c3bf6570e46179775f09
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-05 09:48:22 +02:00
Richard Moe Gustavsen
0b481f28d1 qimagereader: fix build on iOS
Change-Id: Ia928e449ecec49988e0af69da0a7aded5bf36871
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-09-05 09:48:22 +02:00
Richard Moe Gustavsen
acdf946e63 qpluginloader: fix static build (on iOS)
Since the function locatePlugin is unused when
building Qt statically, the build fails on
iOS. This patch will ensure that we only define it
for shared builds.

Change-Id: Idf3c3246d3cac94a3c001cc261f326e9a396aa31
Reviewed-by: David Faure <david.faure@kdab.com>
2013-09-05 09:48:22 +02:00
Giuseppe D'Angelo
9fc2c729b4 Make tst_qalgorithms compliant with the Standard
§24.4.1 [iterator.traits] of N3337 makes it *mandatory* to define the
various types

    std::iterator_traits<Iterator>::{value,pointer,...}

for any given iterator.

§24.4.1.2 makes it enough to define them within our iterator class.

Change-Id: I1305c8392d224889b09395e30ecc77b194020a15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-05 09:48:22 +02:00
hjk
c0df6cbe86 Compile fix in qxcbwindow
There was a error: narrowing conversion of 'Myns::XEMBED_VERSION'
from 'unsigned int' to 'long int' inside { } [-Werror=narrowing]

Change-Id: I1e155870b0b632bfe5ffa9deac69c4f151f5aa23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-05 09:48:22 +02:00
Thiago Macieira
6b7a841cb4 Fix Clang 3.3 warning on using an undefined inline function
Clang doesn't like forward-declared inline functions.

 qmetatype.h:70:29: error: inline function
      'qMetaTypeId<QtMetaTypePrivate::QPairVariantInterfaceImpl>' is not defined [-Werror,-Wundefined-inline]
 inline Q_DECL_CONSTEXPR int qMetaTypeId();
                            ^
 qmetatype.h:1463:30: note: used here
            const int toId = qMetaTypeId<QtMetaTypePrivate::QPairVariantInterfaceImpl>();
                             ^

Change-Id: I1454af5cce56512f0b3d63cfaf51a536207fc511
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-05 09:48:22 +02:00
Stephen Kelly
3f6ed5566f Revert "Implement move-ctor and move-assignment-op for QScopedPointer"
This reverts commit 5b9006bbdb.

Also revert "Doc: Enable documentation for QScopedPointer's rvalue ref functions"

This reverts commit 5f8416ec65.

Adding a move contructor to QScopedPointer makes no sense, because moving
means 'escaping the scope', which breaks the fundamental point of
QScopedPointer.

Change-Id: I4ac1b108bf199af6e436fa1629aa2d3b93c27724
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 08:20:19 +02:00