Commit Graph

23863 Commits

Author SHA1 Message Date
Oswald Buddenhagen
4334ddc76b remove trailing dots from some error messages
the i/o functions are not very consistent about having the dot already
in the message. the windows api does, and qt passes this on.

Change-Id: I2d1a213965e15478985d6eff205689ea44aa2a03
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:19 +00:00
Oswald Buddenhagen
109e3fa0ae make defined() error message tell about "var" type
Change-Id: I21d994ebaee2db0d9b114812a8f89bb680ca311e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:17 +00:00
Oswald Buddenhagen
bd19870b81 make infinite loop protection work even without an iterator variable
... (which is the usual case).

Change-Id: I464b6b284f963df45c7340ed079d540b528136f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:15 +00:00
Oswald Buddenhagen
c9270d6639 fix quote nesting in split_value_list()
a single quote must not disrupt a double quoted string and vice-versa.

Change-Id: Ibb277bc1c930a7dbe9199ca572507ababbcfae4c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:12 +00:00
Oswald Buddenhagen
f37381e292 add autotest for ProString
also adds documentation, which is kind of a sanity test. ehm.

Change-Id: I6b520e8b505a2bfbb1e376fa72be0f140227a3a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:08 +00:00
Oswald Buddenhagen
a3fac53864 add parser tests for use of 'else' after bad conditionals
Change-Id: I9885f629a2f6511574eebd81896a1d9f258e55cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-20 18:11:05 +00:00
Oswald Buddenhagen
79de60f38b silence MSVC warnings about using TS() without parameters
Change-Id: I23264dcabc02b89441fa47c890fc662e9a41f7ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:03 +00:00
Thiago Macieira
9269dcc8ed Fix compilation of QContiguousCache::operator=
freeData() takes a Data*, not a QContiguousCacheData*.

Task-number: QTBUG-45783
Change-Id: I96d7ac38dac24b418138ffff13d7fdf09b1d6b07
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-05-20 17:23:33 +00:00
Topi Reinio
9a1283f8d3 Doc: Qt Network: List the classes on SSL Classes page
Change-Id: I32693ac3012142c04671f8278e06165396ca3242
Task-number: QTBUG-46145
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-05-20 11:24:52 +00:00
Paul Olav Tvete
938f9fc0f8 Workaround for Samsung keyboard bug
Return null string instead of empty string when the selection is
empty. It looks like Samsung just tests for selection == null when
doing backspace.

Task-number: QTBUG-45785
Change-Id: Iaa006a8ffe52b2704c7348646dde9ca4e1f78c5c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-20 10:10:34 +00:00
Venugopal Shivashankar
20e36879d7 Doc: Excluded qdoc files that caused unnecessary Qt Creator warnings.
The customcompleter and textcodes are widget examples, but they end up
in the Qt Core exampledirs boundary because of a reference to the
plugandpaint example in the docs. This resulted in a couple of wrong
entries being written into the examples-manifest.xml, which is used
by Qt Creator.

This change explicitly exludes the qdoc pages for the two examples
so that qdoc doesn't add the corresponding entries into
examples-manifest.xml.

Task-number: QTBUG-41996
Change-Id: I0e95b6d4d93e0ce18f5b34e5034b279598b4924f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-05-20 08:45:15 +00:00
Richard Moe Gustavsen
d204dd1d5e doc: add QStandardPaths documentation for iOS
Task-number: QTBUG-36171
Change-Id: I15c5ac4f5c4944218e5f30c11530160f65699be9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-20 07:45:33 +00:00
Paul Olav Tvete
e2102752ba Workaround for Samsung keyboard bug
Return null string instead of empty string when the selection is
empty. It looks like Samsung just tests for selection == null when
doing backspace.

Task-number: QTBUG-45785
Change-Id: Id26ce707130777fcd0ab1a4cff08367bb2810f2f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-20 07:42:56 +00:00
Maurice Kalinowski
b6634023fa WinRT: Disable exceptions when turned off
On desktop windows we define _HAS_EXCEPTIONS=0 to also forward this
option. Hence harmonize this with WinRT builds as well.

As a side-effect qtdeclarative now compiles without warnings on WinRT.

Change-Id: I8e343f172160991ffb2ede01303802f321de82b5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-05-19 11:46:04 +00:00
Topi Reinio
f1fdac97ab qdoc: Improve logic for automatic example tag generation
QDoc generates tags for examples based on the example title and the
name of the module. This change makes the following improvements:

    - Edit regular expression to match strings like 'OpenGL' and
      'Qt3D' as a single tag.
    - Strip off enclosing parentheses.
    - Filter out common words ('and', 'the')
    - When cleaning/modifying generated tags, keep them in a QSet
      to eliminate duplicates.

Change-Id: I288104df12bf23a224068d40bce1f980148a412a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-05-19 11:19:05 +00:00
Maurice Kalinowski
e994f39a84 WinRT: Fix warnings for Windows Phone
Change-Id: I712facd3054eb0ee54b7d4fcd754845ddcea0ef0
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-05-19 11:18:18 +00:00
Maurice Kalinowski
528b7b1435 Fix warning on WinRT arm
Change-Id: Ibc6a34553bb42319a6937e06ef54cf92847da53c
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-05-19 10:56:30 +00:00
Erik Verbruggen
67d255f183 QStateMachine: empty the whole internal queue before external queue
If the internal queue contained multiple events, but the first one did
not select any transitions, the external event queue would be checked
before the remaining events in the internal queue.

Change-Id: I1a7f49afdefaaf2b4330bf13b079b61344385ea0
Task-number: QTBUG-46059
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-19 08:03:46 +00:00
Marc Mutz
009b11c300 QStateMachine: fix RestorableId exception specification
We're interested in whether qHash(QByteArray) throws, not declval<QByteArray>,
of course.

Change-Id: If3ba6e90aba69d0d4d12ac289e817f0d9705a601
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-19 05:16:24 +00:00
Mikhail Lappo
3f0f707d4b Prevent bad-ptrs deref in QNetworkConfigurationManagerPrivate
Prevent application to crash with segfault in Qt bearer thread.
Corrected hardly reproduceable bug, when
QNetworkConfigurationManagerPrivate in pollEngines slot dereferenced
null and bad pointers and caused crash

Task-number: QTBUG-44407
Change-Id: I2f0b11b2d10125a21a62588d76ad824f375e4a1d
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-05-18 19:33:02 +00:00
Laszlo Agocs
412eb090c9 Fix GLES3 functions on iOS
Task-number: QTBUG-45933
Change-Id: I784e34c1cfee5ea69955c221f0448c1d04e0b6d7
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-18 18:13:46 +00:00
Kai Koehne
661f604fbc Let MSVC treat warnings as errors
Treat warnings printed by MSVC 2012, 2013 as
errors in the modules that declare themselves
warning_clean (for developer builds).

Change-Id: I55fb3bde460e13cfdbd6f59634e3b5335b2dd715
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-18 13:45:33 +00:00
Oliver Wolff
f65c04b37e WinRT/Winphone: Fix warnings in qtbase
Change-Id: I41725bcfeee0124b259e96f1e3a261e30f14350a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-05-18 08:59:55 +00:00
Mitch Curtis
31e055cee9 Fix typo and formatting in QWidget font documentation.
Change-Id: I6dea7f1aa2827dbc4c4068184690c80a36ef2be6
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-05-18 08:13:25 +00:00
Nico Vertriest
c056e529c8 Doc: added doc to undocumented functions
Task-number: QTBUG-36985
Change-Id: Ia98654f88cf5da77245b3fcd903b860d12862fc2
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-05-18 08:01:54 +00:00
Nico Vertriest
a4848142b4 Doc: added doc for non-documented functions
Task-number: QTBUG-36985
Change-Id: I85f58c2877d83b98bf3427cbb0f567575803524f
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-05-18 08:01:37 +00:00
Liang Qi
20efe75916 Merge remote-tracking branch 'origin/5.4.2' into 5.4
Change-Id: Ic1e8b154b43c8d8e3f682c96b074b2b77dbfe2ac
2015-05-18 09:58:45 +02:00
Olivier Goffart
35a125971c Fix QtPrivate::IsQEnumHelper<void>
Change-Id: I1633ef128212a6b99b66129f13e0b4d5ea46644d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-17 09:13:18 +00:00
Joerg Bornemann
298a60d958 WinRT: fix namespaced build
Change-Id: I0505523a5524995e374dc8f005f101d0cea8b01e
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-05-16 19:41:13 +00:00
Giuseppe D'Angelo
a2c4e68141 QStyle debug helpers: refactor dead code
... or compilers complain about the second, unreachable return.

Change-Id: Ic89361859fcf5cf33a57de0c803526702fa831b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-16 10:19:20 +00:00
Giuseppe D'Angelo
6779ec383d QMenuBar: honor the left widget size hint
expandedTo() returns the expanded size, so we must assign the
return value (otherwise it's a no op). We were accidentally
discarding it.

Task-number: QTBUG-36010
Change-Id: Ic70c12648382a6b2ef7d70809bf25caa4cbe2f3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-16 10:19:17 +00:00
Friedemann Kleint
9d85490ea2 Fix exclusion for legacy Open GL examples.
Add dynamic GL and remove warning about ANGLE since that
package no longer exists.

Task-number: QTBUG-46103
Change-Id: Icf93d1105434395a3c9ad61bb8c921fcedfc7137
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-05-15 13:39:56 +00:00
Richard Moe Gustavsen
189280026f xcode generator: use absolute path when creating PBXFileReferences for libraries
Currently, the Xcode generator uses "sourceTree = <absolute>" for
all PBXFileReferences. But the paths we use for referencing
libraries are relative. This patch will change this, so that we
always use absolute paths to be consequent.

This will fix a crash in Xcode that happens when opening
projects generated by Qt.

Change-Id: I3a372b93598a777c96ba353205cf19710a5923f5
Task-number: QTBUG-45966
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-15 13:39:48 +00:00
Richard Moe Gustavsen
d1528919de xcode generator: don't change output_dir when opening a pbx file directly
ProjectBuilderMakefileGenerator::openOutput should only change back
Option::output_dir when creating a pbx file inside an Xcode project.

Since the pbx file will be placed inside a different directory than
output_dir when creating an Xcode project, MakefileGenerator::openOutput()
will redirect output_dir to be inside the Xcode project as well. Since
we don't want this redirection, we change output_dir back to what it
was once the call returns. But we should only do this when creating
the whole Xcode project, since only then we create a pbx file that
is different from output_dir in the first place.

A bug with this is seen when making qt_makeqmake.mak (which is a
helper makefile inside the Xcode project). That file will only
regenerate the pbx file (and not the whole Xcode project), which
means that we don't enter the fileName.isEmpty() section, which
means that output_dir should stay as it is.

Task-number: QTBUG-45826
Change-Id: I03d5c3dec395ff4768f9272fd1981c6fd35efb1e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-15 12:09:58 +00:00
Giuseppe D'Angelo
45f60d2da2 QFileSystemModel: remove useless check
The NULL check is on the line before, no point of repeating it again.

Change-Id: Id6fa9ffc4dcc00819882f2d3157e9dbdb0e1db78
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-15 12:01:44 +00:00
Timur Pocheptsov
1485c2f3fa tst_QDialog::snapToDefaultButton - tune the test for OS X
QCursor::setPos with Cocoa integration is calling CGEventPost. Some time is required
before the cursor position is really set, so we can not immediately call QCOMPARE.

Change-Id: I83a4c13f06ec151a4b9ab18c83de1eb5247ea9cc
Task-number: QTBUG-45553
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
2015-05-15 09:39:41 +00:00
Caroline Chao
1842322b2b Tests: Remove EXPECT_FAIL in tst_QWidget::widgetAt()
The test is marked as XPASS in CI. This change follow 201bf9e673.

Change-Id: I0938b1417f792aa88fc1b40c08e7cd810e7d22f7
Task-number: QTBUG-22326
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-15 09:33:40 +00:00
Alexander Volkov
7d3f353a5b xcb: Fix FP1616 to double conversion
We should divide the fractional part of the FP1616 value by 0x10000
instead of 0xFFFF, otherwise 1.FFFF will be converted to 2.0.
And right-shifting the integer part by 16 is equal to dividing it
by 0x10000. So just divide the whole FP1616 value by 0x10000.

Change-Id: Ia89a274b81be9cf502e1f311f696a610a7f37d7f
Task-number: QTBUG-45378
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-05-14 16:33:48 +00:00
Evangelos Foutras
083c9269ed Try to ensure that -fPIC is used in CMake builds
In commit 36d6eb721e the -fPIE switch was
replaced with -fPIC in an effort to avoid generating copy relocations
which are incompatible with Qt5 when built with -reduce-relocations.

Task-number: QTBUG-45755
Change-Id: I59a55ea15052f498104848c5fd867e563ddc2290
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-14 13:34:38 +00:00
Volker Krause
7d1ec1ae9e Reorder member variables to avoid padding.
Saves 8 byte in each case on 64bit systems, no change on 32bit systems.

Change-Id: I2a2e8786fc7914ee9ae369ba05bedfc9e5e0ca5c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-14 12:06:41 +00:00
Morten Johan Sørvig
a4cba90e19 Set correct target.path for legacy GL examples
Fix Library not loaded/image not found error on application
startup.

With @rpath enabled (commit 6e18f57a) qmake now requires
a correct target.path in order to emit correct -rpath @loader_path
linker directives.

Change-Id: Ia32b038ad2d64819477be5cd9d1ed36768e2251b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-05-14 07:57:11 +00:00
Allan Sandfeld Jensen
e905526090 Better match thin font styles
A style name 'Extra Thin' or 'Thin Italic' should be parsed as Thin
font weight.

Change-Id: I8acebed7330c23231b3742d887081d8b3d0aeb19
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-05-14 00:28:06 +00:00
Kati Kankaanpaa
86601fc575 Fix division by zero crash when restoring screen settings
The restoredScreenNumber was used before it's existence was checked,
which caused 'division by zero' if the screen has been removed after
storing the screen number.

The check if restoredScreenNumber exists was moved to happen before
restoredScreenNumber is used for the first time.

Change-Id: Iada0e8c5cbb6d8ca88df171dbee045be249f50cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-13 20:51:03 +00:00
Sérgio Martins
6ef5ca2e2f QSize, QSizeF: Add Q_REQUIRED_RESULT
...to signatures matching the pattern:
T T::<verb in past tense>() const;

Change-Id: I75d724a3eef5cb94559e31d86914c6e0655b7f13
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-13 16:03:09 +00:00
Richard Moe Gustavsen
31dfdb49b4 iOS: remove 'truncation from double to float' compiler warning
Change-Id: I0b4b1f062180cfe09ceb275484c39afeaaa90cac
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-13 13:00:50 +00:00
Friedemann Kleint
c2e0c126d8 Introduce a version number to QPlatformInputContextFactoryInterface.
Append a version number to QPlatformInputContextFactoryInterface_iid
as is done for QPlatformIntegrationFactoryInterface. Start with 5.1 since
c91c05b056 changes the API in 5.4.
Use macro in plugins.

Task-number: QTBUG-46009
Change-Id: I1d1a89bde50d263354f33a6917efb1c084211842
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-05-13 12:41:30 +00:00
Friedemann Kleint
2142f09c3d Introduce a version number to QPlatformPrinterSupportFactoryInterface.
Append a version number to QPlatformPrinterSupportFactoryInterface_iid
as is done for QPlatformIntegrationFactoryInterface. Start with 5.1 since
a6bcdf1516 changes the API in 5.5.
Use macro in plugins.

Task-number: QTBUG-46009
Change-Id: Ib9d2a02d20b9c4c6ad6c1045a907d69d80e3def4
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-05-13 12:41:24 +00:00
Friedemann Kleint
45ccabdd49 Increase version number of QPlatformIntegrationFactoryInterface.
Increase version 5.2->5.3 in macro
QPlatformIntegrationFactoryInterface_iid and use that in the plugins.

Task-number: QTBUG-46009
Change-Id: I491ab0ac169ede5c103b40e1bcbcbf511922a911
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-05-13 12:41:15 +00:00
Friedemann Kleint
4201d85cde QPA plugins: Use _iid macros instead of strings in Q_PLUGIN_METADATA.
This makes it easier to change the version numbers by changing
the macros in QtGui.

Task-number: QTBUG-46009
Change-Id: I94c9591ec6f7c9173a698df9e1fe8fd6a904caf4
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-05-13 12:41:09 +00:00
Gabriel de Dietrich
629f5a46d5 moc: Generate qt_static_metacall for creatable-only gadgets
Prior to this, moc would not generate the function unless the
gadget class had a property or a non-constructor invokable.

Change-Id: Ic020ea5f8f59702f5e9e194a46e26850e53e5cfe
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-13 12:08:57 +00:00