Commit Graph

13895 Commits

Author SHA1 Message Date
Oswald Buddenhagen
bc328f8ec3 remove nonsense DEFINES
Change-Id: Ie079c52eb800878983501b9fe2b2f6c27df0cdb1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-03 21:38:37 +02:00
Ivan Komissarov
e9d50f2ec2 Remove unnecesary check in qcocoawindow
Change-Id: I066bef5fcdf19785c8e2cbf7dc704711d84af414
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2013-07-03 21:38:37 +02:00
Ivan Komissarov
4634b7516d Remove qWarning() in qt_mac_image_to_cgimage()
Change-Id: I839aa44735910012bf57daa9c8b55c5e6def3cd2
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2013-07-03 21:38:37 +02:00
J-P Nurmi
eeffcfbd89 Cocoa: fix shared color panel usage
Task-number: QTBUG-31819
Change-Id: I60162f4c4af8aaae02ba7be11b2793ad29c5e2b5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-07-03 19:38:55 +02:00
J-P Nurmi
17fe17d525 Set correct cell when selecting custom color cell with arrow keys
Correct cell is now set when selecting a custom color cell with arrow
keys so that the custom coor is actually added to the selected cell
(as with mouse events).

Task-number: QTBUG-32054
Change-Id: Ic271a0be76070b4f5364954b2dfe464964c1380b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-03 12:30:22 +02:00
Stephen Kelly
bc03e80f9a Hardcode the VERSION reported by qmake instead of calculating it in cmake.
Change-Id: Ia83f995a64a56c845bbce1a90702a98fc83a1401
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-03 12:15:40 +02:00
Stephen Kelly
494c81e78a Add some return() to remove indentation levels.
Change-Id: I48dc013fece0f4758ad54342f97ed51b33a9c2ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-03 12:15:33 +02:00
Wouter Huysentruit
9514422eee Set projection matrix for systems with OpenGL 3.1
The projection matrix should also be set for systems
running OpenGL 3.1 with GL_ARB_compatibility extension.

Task-number: QTBUG-28284

Change-Id: I756155a6064dcbff29fd817e676d31f24f559e8c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-07-03 06:43:32 +02:00
Thiago Macieira
bc7e63e3f9 Don't enable EGL support if OpenGL is disabled.
QtPlatformSupport fails to build if EGL support is enabled but OpenGL
isn't. It tries to compile eglconvenience, but qplatformopenglcontext.h
is empty (#ifndef QT_NO_OPENGL).

It makes no sense to have EGL with no OpenGL ES, so make sure we don't
try it.

The current test to disable EGL if OpenGL desktop is active is upside
down. With -opengl desktop -no-egl, it would complain that EGL support
was requested.

Task-number: QTBUG-28763
Change-Id: I80c780ec78181f3fa85f43e41be21d1217d76610
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-03 01:24:12 +02:00
Thiago Macieira
fc4d45d97d Fix change-of-sign warning found by ICC
qstring.cpp(3896): error #68: integer conversion resulted in a change of sign

The line before also had 0x8000, but since there was no addition,
0x8000 was a literal converted to short. However, 0xff + 0x8000 is an
int, and 0x80ff is positive, while short(0x80ff) is negative.

Change-Id: I445ff401d817b643479e54320525890ce12bbfe5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-03 01:24:12 +02:00
Thiago Macieira
d94961d08f Don't crash if the relayed signal was emitted from the wrong thread
Under normal circumstances, this should never happen. Signals exported
to D-Bus should only be emitted from the object's own thread. That's the
only way for the receiver (the QDBusAdaptorConnector object) to know
what the sender object and signal were. If they are emitted from another
thread, the sender will be null.

Task-number: QTBUG-31932
Change-Id: Ia5a45d648985e0645bffd4abc0881fca9da64f79
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-03 01:24:12 +02:00
Stephen Kelly
efb592503a Add a unit test for testing Qt in its install location.
The Qt CI system runs the unit tests after installation, but
with the qmake in the build directory. This means that the
installed content is not unit tested. Add an additional cmake
unit test to test the files in the install location.

The new test is marked insignificant for now until the true
effect on the CI system is known.

Task-number: QTBUG-27315

Change-Id: If9f12e88cfc741946cfabc25dbf789a11a2af4b8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-02 23:08:54 +02:00
Matt Fischer
5782fc2fa4 Disable xkbcommon when building for QNX from Windows
A previous commit (7582bb5) added a line to disable xkbcommon
when building for Android.  A similar line needs to be added to
handle QNX builds.

Change-Id: I34e91d989567b17e7e21b87d9c377360e4e56f68
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-07-02 18:39:37 +02:00
Parker Coates
40894d2874 Fix rotation of text in vertical QDockWidget titlebars in QFusionStyle.
Presumably this was just an omission when QFusionStyle was first
written. These three lines were taken directly from the equivalent
portion of QWindowsStyle and seem to work as expected.

Task-number: QTBUG-31904
Change-Id: I2f288d3cf2bfa3fe4f7f4a71e2726a172ec8e1b3
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-07-02 18:39:37 +02:00
Jan Arve Saether
14721becc3 Do not call QAccessible::child() with a negative index.
Fix assert on Windows:
QFATAL : tst_QAbstractItemView::testChangeEditorState():
ASSERT: "index_ >= 0" in file itemviews.cpp, line 1123

Change-Id: I4f19c68bbe00d9c75768e7125cf3b33bc09a09e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-02 16:33:08 +02:00
Friedemann Kleint
671d607512 Windows: Fix detection of synthesized mouse events for MSVC / 64bit.
For some reason, the enumeration values were signed when using
64bit.

Task-number: QTBUG-31386
Change-Id: I891dbe1a82dc2aefbe13a131c72c01a57f981767
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-02 16:33:08 +02:00
Gabriel de Dietrich
323164f5fb Avoid warnings when fetching file icons without a CGContextRef
This can happen when instantiating a QFileIconProvider and no suitable
graphics context is available (e.g., when only using a QQuickView).

The proper, longer (5.2) term solution would be to have the platform theme
return a QIcon with a NSImage icon provider.

Task-number: QTBUG-31908
Change-Id: Ibfdb51e0a7dd2c33761a463f4eb6619f0aca19f0
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-02 16:33:08 +02:00
Andy Shaw
fa1fb5ed94 Only add the res_file to the generated files if there is no rc_file
If both the rc_file and res_file was added to the project then in MSVC
2012 it would cause an error complaining of a duplicated resource.

Task-number: QTBUG-29826

Change-Id: Ib3401b423208cd8c90895038c9cbadd80c39b542
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-02 16:33:08 +02:00
Tor Arne Vestbø
54a85d561b qmake: Change two scopes to mac instead of macx
As they apply to both OSX and iOS.

Change-Id: I6ea9c80f9cf3fd593723ae449f16d7905f68545e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-02 16:33:08 +02:00
Joerg Bornemann
5cfac290ca remove wait calls in tst_QProcess::simpleStart
Instead of calling different wait functions on different platforms,
we use QTRY_COMPARE to check the process state.

Change-Id: I6489cabce9e63f9c8b1036f3cccbf35b52df72e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-07-02 16:33:08 +02:00
Gabriel de Dietrich
e8c3316ab0 Cocoa: Re-establish platform menu QObject hierarchy
This amends commit 119882714f.

Change-Id: Ifb105596af5b00b04344cb665b3e68292c9187ae
Reviewed-by: Romain Perier <romain.perier@gmail.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-07-02 13:44:10 +02:00
Giuseppe D'Angelo
658dfef500 Remove default argument from declarations of qHash as friend
It's illegal in C++11: §8.3.6.4 [dcl.fct.default]
"If a friend declaration specifies a default argument expression,
that declaration shall be a definition and shall be the only declaration
of the function or function template in the translation unit."

Clang is starting to enforce this, thus it's making qtbase not compiling.

Task-number: QTBUG-32100
Change-Id: Ifd9d4f62354d7cf4ccf275f36aab64e05c59efff
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-07-02 13:34:56 +02:00
Friedemann Kleint
6177a3026b Windows: Fix the code of the native color dialog.
Note: The code is currently #ifdefed out, it is just there
to be able to compare QColorDialog to the native dialog.

Task-number: QTBUG-32054
Change-Id: I042f6701d1a076480cae56c53ae2d3ad303d37d1
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-07-02 11:05:18 +02:00
Gunnar Sletta
032d2c9e8e Fix dropshadow and blur graphics effects.
The effects are making assumptions about implementation details of the
paint engine, which had changed between Qt 4 and Qt 5. The engines no
longer implement the pixmap filters and so the assumption made here
was wrong and should be removed.

Task-number: QTBUG-29945
Change-Id: I146d8c8cc12842a323bd613288003afcf89a47c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-02 11:05:18 +02:00
Sérgio Martins
6800728d09 Windows: Fix bug where windows stopped painting after a restore.
Usually, a window get un-exposed when minimized, and exposed
after the first WM_Paint event when restored.

With layered windows (translucent+frameless) we never receive
a WM_Paint, so lets send the expose event when the window is
restired.

Task-number: QTBUG-17548

Change-Id: Ib56d8abd91b15f9238d223fe692b19a3d2c930b7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-07-02 11:05:18 +02:00
Friedemann Kleint
bef01c87a8 QtCore: Fix remaining MSVC-64 warnings about integer truncation.
warning C4267: 'argument' : conversion from 'size_t' to ' int', possible
loss of data.

Change-Id: I8d1ca27d4d66a9ce0deb70766446e780308bba33
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-02 08:18:20 +02:00
Thiago Macieira
7becb8b807 QUrl test: ensure that hostnames with bad non-IDN domains are caught too
Leading and double dots are bad, but trailing dots are fine. The ASCII
part of a hostname is supposed to be LDH (letters, digits, hyphen) only,
but we accept '_' (underscore) as an exception too.

Change-Id: I79957ddec4da78a0e2357fe50c8687db03e1c99e
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-02 02:56:27 +02:00
Mark Brand
96a22ed926 fix off-by-one index check
Change-Id: I6d6461eec24895e9aa0e77deccd39210958b7e2c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-07-01 21:22:33 +02:00
Gabriel de Dietrich
971bdc90e9 QIcon: Avoid fetching twice the same pixmap
Looks like something went through the reviewer's eyes. This commit
amends 6ec9b34cbb.

Change-Id: I59a05361b1cbdf4e5177821d958766ffe3218f16
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-07-01 18:07:57 +02:00
Gabriel de Dietrich
93e79d865c Cocoa: Let Cocoa pick the right pixmap for menu item icons
Task-number: QTBUG-31477

Change-Id: Iac2d13b68d36c691b60685b69cd390958c35fae3
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-01 14:00:30 +02:00
Gabriel de Dietrich
0aa0675040 Cocoa: Simplify qt_mac_cgimage_to_nsimage code
Since 10.6, NSImage has a sensible contructor for that.

Change-Id: Ie753135ebb37630c1a70c395689bf85d4a4a01de
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-01 14:00:22 +02:00
Keonil Jeong
b67f4238b8 Fix build when QIMAGEREADER_DEBUG is enabled in qimagereader.cpp
If QIMAGEREADER_DEBUG is enabled in qimagereader.cpp, the build fails.
There are wrong variables in qimagereader.cpp:314,395

Change-Id: I22498c49fbfecb3799dc5cabf374486bb715ded7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-01 13:51:26 +02:00
Thiago Macieira
5dfeb9d687 Fix comma warning found by ICC
qsql_psql_p.h(122): warning #271: trailing comma is nonstandard

Change-Id: I35e12b2ae0201b8a9905d3505697a9b36a1a79e2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-07-01 11:07:14 +02:00
Kai Koehne
205d7a184f Change error text for missing platform plugin
Model error text after the default Windows error message for missing
.dll's.

Change-Id: I5328a0fe681ff5104dcf41668d9b08d6a6198c08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-01 09:02:54 +02:00
Gunnar Sletta
a1f9b2b2b0 Make the test a bit more sane.
Unactivating a window is not really supported, nor has it ever really
been, so activate another window instead. This incidentally
also makes the test work cross platform.

Change-Id: I6e593e9b7972dd5c5038c8d18a42be90bf19248c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-07-01 08:57:52 +02:00
Thiago Macieira
9f763d2fbe Remove unused variables (as found by ICC)
qgraphicsscene.cpp(1814): warning #177: variable "v1" was declared but never referenced

Change-Id: I8f14bb47f00ec0c56b2fe0794a71edfc872b3daa
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-07-01 02:02:25 +02:00
Thiago Macieira
64a7ac344e Deal with unused functions, as found by the Intel compiler
Use Q_DECL_UNUSED for the one that is possibly unused (we have two overloads so that one gets selected):
qglobal.cpp(2069): warning #177: function "<unnamed>::fromstrerror_helper(int, const QByteArray &)" was declared but never referenced

Remove functions really not used:
qbezier.cpp(153): warning #177: function "findInflections" was declared but never referenced
qbezier.cpp(534): warning #177: function "splitBezierAt" was declared but never referenced
qpathclipper.cpp(1039): warning #177: function "midPoint" was declared but never referenced
qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced
qdockarealayout.cpp(2580): warning #177: function "qMin(int, int, int)" was declared but never referenced
qmainwindowlayout.cpp(1019): warning #177: function "validateDockWidgetArea" was declared but never referenced
qgraphicsanchorlayout_p.cpp(670): warning #177: function "checkAdd" was declared but never referenced
qcups.cpp(481): warning #177: function "paperSize2String" was declared but never referenced
complexwidgets.cpp(373): warning #177: function "removeInvisibleWidgetsFromList" was declared but never referenced

Change-Id: I1e5558e206b04edea381442030dc69536198d966
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-07-01 02:02:17 +02:00
Thiago Macieira
4bc450408c Fix warning caused by warning fix
qevent.h:865:36: error: unknown warning group '-Wunused-private-field', ignored [-Werror,-Wunknown-pragmas]

Instead, just use Q_UNUSED() like I've done for the other unused
members.

Change-Id: I3adeb06937cee8b8ac24a1d5081be03931ac98b7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-01 02:00:02 +02:00
Robin Burchell
fbcd6a29c1 moc: Avoid non-deterministic output which causes unnecesary rebuilds
Change-Id: I4fdd2b37869ed73ede3a33b5adad94413bd43b01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-30 00:48:34 +02:00
Bernd Weimer
f62c92ba84 BlackBerry: Increased loop level around bps_get_event
This is needed, because bps_get_event can also invoke callbacks.
Deferred deletions in such a callback are not executed for instance,
because the loop level might already be at its minimum.

Change-Id: I8a1b3a3f92de139575654de011352f8abc6c3c1a
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Jeff Kehres <jkehres@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-06-29 11:36:31 +02:00
J-P Nurmi
cfd207212d Fix the cursor position of an empty QLineEdit with a placeholder text
Task-number: QTBUG-32061
Change-Id: I43b689d8d7bc3c93036de48518f7a0f9f2aa33cf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-06-29 09:27:54 +02:00
Frederik Gladhorn
cb6fec8515 Merge remote-tracking branch 'origin/release' into stable
Change-Id: I53112e20a65b7d706755b4a22622979f3b91a2c2
2013-06-28 19:18:10 +02:00
Oswald Buddenhagen
cb79be2076 remove qt_no_framework_direct_includes from qt build
only the include statements found in public headers are constrained to
work with this flag. our own c++ files and private headers can use other
styles, which this flag breaks.

Change-Id: Icb1ced17dc438083731049788ac28349c87ba7ef
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-28 15:43:04 +02:00
Oswald Buddenhagen
933ae0a087 install qpa headers into frameworks as well
they are a somewhat different kind of private headers, but follow
generally the same logic.

Change-Id: Ic6f42ed7061dde2ffd0e32b1d713354b58a20970
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-06-28 15:43:00 +02:00
Oswald Buddenhagen
a3feba6985 fix location of private headers in mac bundles
Change-Id: I2d9f117d4b25df878abc525499748ed1df9b9c18
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-28 15:42:55 +02:00
Friedemann Kleint
2f4cd18d3e Add Q_REVISION(1) to QWindow::alert().
Task-number: QTBUG-32069
Task-number: QTBUG-30416

Change-Id: Idabf9962def24ecd709be7d981302c91c42ccac4
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-06-28 15:42:49 +02:00
Shawn Rutledge
12d45cdc49 QWindow min/max width/height, contentOrientation are not new in 5.1
so that part of Id03ae17270832a7b5915e4324a508e591c0b6d98 which added
the Q_REVISION(1)'s and \since docs was a mistake.

Change-Id: I159b68491bd7dc55657d8c978bff527094ef4547
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-06-28 15:42:45 +02:00
Tor Arne Vestbø
f7a7859a7e Deprecate Mac libc++ mkspecs
We handle C++11 and libc++ through c++11.prf now, so separate mkspecs
are not needed. Deprecating them allows us to remove them in a later
release.

Change-Id: I4e525f445aeab88c926fa62cedef6aa9b32a7f55
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-28 15:42:40 +02:00
Mitch Curtis
37351bbecf Touch up QSurfaceFormat documentation.
Change-Id: I439ffa7632dbfe6d9e2c4e40447bfabfeac76f7b
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-06-28 14:38:44 +02:00
Friedemann Kleint
5016615e33 Fix system tray icon on X11.
Observe Qt::BypassWindowManagerHint in XCB and use it for the
tray. Remove the call to XSync(), which sometimes was causing
the window to appear in the wrong place for a short time.

Task-number: QTBUG-31762

Change-Id: I7b4fc5e42b8c8bb9d03b1575be99d6d1c727be37
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-06-28 10:58:53 +02:00