Commit Graph

19714 Commits

Author SHA1 Message Date
Kai Koehne
e668837b9c QDebugStateSaver: Fix trailing space issues
~QDebug() removes any trailing space if autoInsertSpaces() is true.
However, if one uses QDebugStateSaver the global autoInsertSpaces might
be false, but a space was added by a custom operator<<.

Explicitly check for this in QDebugStateSaverPrivate::restoreState. Remove
any trailing space if the local state asks for adding trailing spaces, but
the original one doesn't. Add a trailing space if the local state doesn't
ask for one, but the global state does.

Change-Id: I243b5c76d5ed2c1ec4820da35ab6e254da1551d9
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-23 13:33:25 +02:00
Nico Vertriest
66dbee1278 Doc: corrected autolink errors in qnamespace.qdoc
Task-number: QTBUG-40362
Change-Id: Ic2a0740a12c98a60cb1d178c4d42c4ae1c39869c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-07-23 13:24:03 +02:00
Tor Arne Vestbø
66c47292bd iOS: Let QScreen manage UIWindow and root view-controller
Instead of having the application delegate set up a UIWindow and root
view-controller, we move the responsibility to QScreen, since in a multi
screen scenario we will need one UIWindow per screen, as well as one
root viewcontroller per window.

Change-Id: If5b0d44b8f8a697d830b33b4fe420bff56a7629b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-07-23 13:23:23 +02:00
Friedemann Kleint
3770f4b148 QLockFile/Windows: Determine host name from environment variable COMPUTERNAME.
Useful when using shared directories.

Task-number: QTBUG-39967
Change-Id: I2c082e33133b00306378b6ff58478e94119e6a0e
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-23 13:19:24 +02:00
Kai Koehne
7aae6219d5 Keep global state of debug stream (QImage, QPixmap, and QIcon)
Make sure that the stream's formatting settings are preserved.

Change-Id: Ib13b5e0b36b2ef801da2d2d5c240d28dc1b04653
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-23 13:13:04 +02:00
Jerome Pasion
b5b4eb742c QDoc: Fixed section title offset in QML basic type pages.
-QML basic type page layout is now separate from the other
 doc page layouts, but the section offset was incorrect.
-the offset is the same as the QML type pages.

Change-Id: I422e97eebe58a87c11607f2c8c5aedb10abbda7e
Task-number: QTBUG-40335
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-23 12:09:51 +02:00
Jerome Pasion
bd9d1f83f9 QDoc: Restored QML basic type pages' table of contents.
-QDoc in 5.4 processed QML basic types as separate pages
 but the ToC wasn't added.

Change-Id: I5a887158bacef923e765accac7ee5ca7c2c7a12b
Task-number: QTBUG-40335
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-23 12:09:46 +02:00
Thiago Macieira
1bd27f24fb Add link-time optimization support for Clang, GCC and ICC
GCC currently requires fat object files for static libraries, since the
linker would otherwise not load the .o file from the archive at all and
the linking would fail with a lot of undefined references. Clang on
Linux also needs this, but it has no equivalent flag, so enabling LTCG
for Clang on static libraries will result in linker error.

This commit does not add support for enabling it in configure. It can be
enabled on a per-project basis by doing CONFIG += ltcg or by passing
-config ltcg to qmake's command-line.

Change-Id: I52cf99f1ed9f1701e23a3b457ba3502fd28126ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-23 11:12:02 +02:00
Kai Koehne
849d1fece1 Be more specific in "Loading logging rules" debug output
Change-Id: I8a6f1797cbcfabc6df76ce17115a678f729ac711
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-23 11:10:40 +02:00
Kai Koehne
9782938045 Introduce Q_DECL_UNUSED_MEMBER for clang
Since version 3.2, clang warns about unused member variables
(-Wunused-private-field). Marking such members with
Q_DECL_UNUSED_MEMBER will silence this warning.

This is a cleaner way than using Q_UNUSED() somewhere in the class
methods (like we did previously in qloggingcategory.cpp). It
mirrors Q_DECL_UNUSED for unused variables, which however can't be
used unconditionally for member variables because e.g. gcc will
complain.

Change-Id: I2afff683a7c3bae3bdcd684e5085a643887bb2a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-23 07:45:22 +02:00
Kai Koehne
e46d72751b rcc: String literal conversion cleanup
Replace QString::fromUtf8 with QString::fromLatin1 for ascii strings.
Also optimize use of QT_VERSION_STR.

Change-Id: I13c683499c56cb4ac4d2bbd9b6b53c337917e347
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-23 07:44:15 +02:00
Alex Trotsenko
edfac1a9ed Make QRingBuffer::append() not leave empty arrays in buffer list
Change-Id: I4c5af33488a70996299289ec2b953b7bf3b2c428
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-23 07:31:09 +02:00
Simon Sasburg
3905c6f00d Add QFileDevice::MemoryMapFlags::MapPrivateOption flag.
Passing this flag to QFileDevice::map() will allow writes to the mapped memory
without modifying the file that was mapped. These writes will be lost when the
memory is unmapped.

Change-Id: I7d46b044fc370585de8c06fdb4059f1f1be12d7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-23 07:20:40 +02:00
Frederik Gladhorn
abd3b8030c Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/widgets.pro

Change-Id: I697eec936c4e1a6c360edc8f0b472e23c0461ecb
2014-07-22 20:21:19 +02:00
Friedemann Kleint
fac1d4d17e Windows: Fix assignment of margins in QPageSetupDialog.
Task-number: QTBUG-40061
Change-Id: Id5c952a7d6280f2ab7180bff01911d6cffe57034
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-22 15:32:34 +02:00
Allan Sandfeld Jensen
b0d0a2680a QPixmap::fromImage() should detach when changing QImage format
When QPixmap::fromImage() detects an ARGB32 image with only opaque
pixels it will do a conversion where it only changes the advertised
format of the image. This conversion was lacking a check to see if it
the QImage was shared before doing so, which this patch adds.

Task-number: QTBUG-40282
Change-Id: I3acf221b76735637cef04c2104a33f87e5f09d54
Reviewed-by: Andreas Löw <andreas@code-and-web.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-22 14:54:16 +02:00
Friedemann Kleint
f713bd3e19 Fix warnings about integer conversion in qloggingregistry.cpp.
io\qloggingregistry.cpp(134) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
io\qloggingregistry.cpp(138) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
io\qloggingregistry.cpp(142) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data

Change-Id: Ic9787aa8acb5cb4440c62bbb143f7c2b7fdad385
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-22 14:46:00 +02:00
Kai Koehne
4fb0ca4209 QDebug: Add a doc section about formatting options
Change-Id: I43cb965f9f45e8a50c767c7e9035811c90e6aab3
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-07-22 14:45:27 +02:00
Samuel Gaist
4cedc55327 Windows: Add Qt Creator PATH update tip for missing SQL client dlls
This patch aims to provide an additional tip for users having trouble
with e.g. the MySQL plugin. After a successful build most users are
struggling with loading failure due the fact that the client libraries
folder is not contained in the PATH environment variable. This tip
helps them overcome that in a controlled manner with Qt Creator.

Change-Id: I2dc5c9c6d8d8976686d74c369b6e1683c479f35c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-07-22 11:32:08 +02:00
David Faure
6f3bb0aafa tst_qurl: add tests for mailto parsing and toString. No bug.
This was prompted by https://git.reviewboard.kde.org/r/119221

Change-Id: Ia148f07f6d711df533693918bbedfa5e7dc02cd5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-22 11:01:52 +02:00
Eskil Abrahamsen Blomfeldt
5cb581b3b4 Windows: Default to MS Shell Dlg 2
In Qt 4, the default font for unrecognized font families would
be MS Shell Dlg 2, which is an alias for the default UI font on
the system. However, QFont::defaultFamily() had not been updated
to match this and would return MS Sans Serif instead, which was
the default UI font on Windows 9x. This is a raster font and not
really suitable for modern UIs.

In Qt 5, the problem with defaultFamily() was fixed, but Arial would
be returned as the default instead.

Enter change afd6313755 which tried
to revert the change to defaultFamily() and return MS Sans Serif
again. However, since it changed the actual default family and not
just the one returned by the function, this broke several tests
which depended on having a scalable default font.

This change sets the default family to MS Shell Dlg 2 like in Qt 4.
The fact that defaultFamily() now reports the actual default is
regarded as a bug fix, so we will not change this. Fixes some
XFAILs in qtdeclarative.

[ChangeLog][Windows] Set default fallback font to MS Shell Dlg 2
instead of Arial.

Task-number: QTBUG-39961
Change-Id: Ib08dfc7f2c00475d54d565bb933d1d2f8a3a3d90
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-07-22 09:09:36 +02:00
Friedemann Kleint
43e8c1896d Improve debug output of QImage, QPixmap and QIcon.
Task-number: QTBUG-38858
Change-Id: Ie45d595478f971c7ed973d911c65484d947d2a60
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-07-21 22:29:03 +02:00
Kai Koehne
c76a91ebdc Improve debugging output for QLoggingCategory
Make sure that the source the rules are loaded from is printed before
any syntax errors.

Change-Id: Id7ced1a346dd0d8501eab93ac00e1f432ca6b703
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-21 22:26:16 +02:00
Kai Koehne
1f9de90b4e Add example qtlogging.conf file to QLoggingCategory documentation
Change-Id: I0ceeb8afa711cc7bc1378287b0d550871e5bfd9d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-21 22:26:08 +02:00
BogDan Vatra
b379161565 Android: Add uninstall option.
Uninstall option will uninstall the test afer has been executed.
It is useful when you are using your own phone to execute the tests.

Change-Id: I2a3f6c3a93099d70c98f9ce059da22c409b55843
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-21 20:38:00 +02:00
BogDan Vatra
e8a97d8743 Android: Use androiddeployqt from qt path.
Change-Id: I085f2b20d1f53e3f5caf0b208f64a75c26a89219
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-21 20:37:51 +02:00
Fawzi Mohamed
a09ef38456 resoureces.prf: use small resources (though cpp file) for xcode
currently there isn't a clean solution yet to support object files
or architecture specific files during the preprocess step when
using the xcode generator.
This fixes ios resources (but will break with large resources).

Task-number: QTBUG-39835
Change-Id: If620ab0c3b5c1f92db8f7b4740061c807730db57
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-07-21 15:45:30 +02:00
Friedemann Kleint
ae99f83312 Windows: Fix window geometry when transiting from fullscreen to maximized.
The workaround added for QTBUG-8361 also needs to trigger in the
restore-from-fullscreen logic, set flag accordingly.

Task-number: QTBUG-40254
Task-number: QTBUG-8361
Change-Id: I6d6c35bb7004c84c6b8feea05ad974c23ca205d2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-07-21 15:38:05 +02:00
Tor Arne Vestbø
3c5d405f34 iOS: Detect external screen connections and expose as additional QScreen
The additional QScreen can not be used for anything yet, since we don't
set up a window and root view controller for it.

Change-Id: I335b796bdd89fc58a27ec4e20c5ed355be0cab66
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-07-21 15:27:50 +02:00
Tor Arne Vestbø
f1724e4d8a iOS: Add helper for getting the iOS platform integration instance
Change-Id: I550d345ab0f8bcba1225c425464e198d43d9fda8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-07-21 15:11:07 +02:00
Tor Arne Vestbø
5f9e1b079c iOS: Fix compilation with Xcode6/iOS8 SDK
We were implicitly including OpenGLES/ES2/glext.h prior to iOS8.

Change-Id: I353badb5c209b9ebc57c1718223c164590705064
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-07-21 15:11:03 +02:00
Tor Arne Vestbø
f86993cdee iOS: Refactor qioswindow.mm into quiview.mm and quiview_accessibility.mm
Change-Id: Ib6297e37d67b2c0ea251ae054b8ff877af2673a5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-07-21 15:10:59 +02:00
Friedemann Kleint
7daf920e97 Fusion style: Use QStyleHelper::dpiScaled() where applicable.
When running unscaled on a high resolution display, some items
are too small. This patch converts most values returned by
QFusionStyle::pixelMetric() via QStyleHelper::dpiScaled(). Some
adjustments have been done to RadioButton, CheckBox, Slider and
SpinBox.

On systems with 96dpi, FusionStyle should still look exactly as
before this patch.

Task-number: QTBUG-40277
Task-number: QTBUG-38858
Change-Id: I2683a8a4db615d01c08f4d6f559417b995c0eb1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-07-21 11:40:08 +02:00
Friedemann Kleint
cf5e496813 Windows printing: Preserve painter when syncing state.
Fix a performance regression introduced by
58bb42dc2c . The picture painter
was replaced by another painter.

Task-number: QTBUG-40068
Task-number: QTBUG-38329
Change-Id: Ida51edd61c197f862adebdcdc685ebc105fe07a8
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-07-21 10:38:13 +02:00
Eskil Abrahamsen Blomfeldt
e746e2a11a Android: Fix tests in gui/text requiring test data
Several tests require test data to be deployed with the
application. The easiest way to achieve this on Android
is to add them to a qrc file and use the QFINDTESTDATA macro
to look up the files. This fixes several test failures
in the gui/text subdirectory for Android.

Change-Id: If944bb1fc93434a1b2d6487da829d21bd6b84e87
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-07-21 09:49:09 +02:00
Thiago Macieira
40d3ab564b Add support for CONFIG += c++14
Most compilers out in the wild still don't support the flag, so we need
to compare the version number anyway. This also makes it ready for
whenever compilers start supporting -std=c++14, something we should fix
for C++11 too.

It overrides the CXX11 variable for two reasons:
 1) we reuse the mechanics in c++11.prf
 2) we avoid c++11.prf overriding the flag if qmake decides to process
    it later (CONFIG += c++14 is additive)

Change-Id: I79b6523fd9017483f2474634d1c09f2fd5ea039d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-20 04:32:44 +02:00
Thiago Macieira
4a99beb7ef "Beautify" the two-pass RCC execution
Use newlines in the Makefile for multiple commands.

Change-Id: If03617343ccf7e525ffdc27ad9df55718c63d77f
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-20 04:32:41 +02:00
Konstantin Ritt
461c2b2004 Update bundled HarfBuzz-NG copy to 0.9.32
- Unicode 7.0 support
- New shapers
- Multiple improvements in Arabic, Indic, and Hebrew shapers
- Build fixes, optimizations, etc.

Change-Id: I0ba14b619c3e6fb35cddd9d65e694af41197d6ae
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-20 01:12:24 +02:00
Alex Trotsenko
0078013693 QRingBuffer: purge unused part of the api
Remove unused and untested class functions.

Change-Id: I8eb963db0ae4be9b5cdde91f6747c4a1db4ea649
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-18 18:29:19 +02:00
Friedemann Kleint
ec190b0da7 Fix up existing high DPI manual test.
Compile on Windows, add command line options to activate the
various tests.

Task-number: QTBUG-38858
Change-Id: I38c6a9a6711831b2bd8b6ea051dd19615cc911a1
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-07-18 16:45:44 +02:00
Liang Qi
8b8eebd8a4 generate QGL header file from qgl.h
Task-number: QTBUG-16838
Change-Id: I511d0c18a13c5dc9b9ae7a28587440f48bc53427
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-18 14:54:11 +02:00
Friedemann Kleint
f547381806 Implement QApplication::topLevelAt() using QGuiApplication::topLevelAt().
Reducing code duplication, preparing for High-DPI support.

Task-number: QTBUG-38858
Change-Id: Id0ed12db4b5cadd0eef79afd0ac62f58a7b01901
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-07-18 12:10:56 +02:00
Topi Reinio
fe099b6383 qdoc: Validate index file paths
Check for existence of the paths added by 'indexes'
documentation configuration command, and generate
warnings accordingly. Also, ensure that the strings
added with 'depends' command contain no duplicates.

Change-Id: I66a3d1b25907567bb5bfc72b78a8009d7bd8e067
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-07-18 10:14:42 +02:00
Topi Reinio
d15309edee qdoc: Support use of \value command outside \enum topic.
Even though qdoc accepts the \value command(s) anywhere in the
documentation and generates tables for them, the produced output was
invalid for documentation topics other than \enum.

This change fixes the issue by not trying to resolve the enumeration
values and removing the 'Value' column for generated tables when the
\value command is used outside c++ enum documentation topic.

This enables, for example, the use of the \value command for
documenting acceptable values for QML enumeration properties,
without having to use custom lists or tables.

Task-number: QTBUG-35019
Change-Id: I597b2f9d7d03d4ab72f276752ddf53e1c405313c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-18 10:14:31 +02:00
Friedemann Kleint
a71e285133 Ensure transient parents are top level widgets.
When a dialog was parented on a native child widget,
its window handle was used as a transient parent.
This confused QPlatformWindow::initialGeometry() among
other things. Use top level window as is in Qt 4.

Task-number: QTBUG-40195
Change-Id: Ic82adc276175f92adde825fb2551274351e41f30
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-07-18 09:25:05 +02:00
Friedemann Kleint
e2203163d9 Windows: Send QTabletLeaveProximity events.
Proximity leave comes without packets, do not bail out.

Task-number: QTBUG-40019
Change-Id: I4e6b4ca13ad875bdfdcd31f86b08de4a596e76cb
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-17 14:57:16 +02:00
Nikita Krupenko
feb1afc782 Added stream version into network cache file format
At the moment, there is no stream information in the cache file. This
can lead to a problem when current stream version differs from version
cache file written with.

As an example, if file written with Qt 5.1.1, QTimeDate in the metadata
stored as 13-bytes value, but Qt 5.2 and later can read additional 4
bytes which breaks following data, leading to network request just hangs
forever.

Adding stream version fixes this problem.

As cache format changed, cache version bumped.

Task-number: QTBUG-36219
Change-Id: I467d8c9fda82bcf9302192f51e7a00d2f6a9ff66
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-07-17 11:28:18 +02:00
Friedemann Kleint
9c774b7621 QItemSelectionModel: Sort persistent model indexes taking parent into account.
When sorting a tree model with large sub-trees and and a large
selection, the existing sort function would mix indexes of
different parents, causing a fragmented selection,
which slows down painting.

Task-number: QTBUG-33954
Change-Id: Ia585fc1e5de9a1a3f6124a58c9c7c40fcbdbfb6a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-17 11:26:29 +02:00
Jerome Pasion
83c6e74a0c QDoc: Allow the listing of uppercase- and lowercase-named items in list.
-QML basic types are lowercase-named while object types are uppercased.
-reference page for QML types should list both.
-caveat: simple implementation means the uppercase items are listed
 first.

Change-Id: I9092ad0cd9e79c4d3f8b794ac5d68879ce6338a5
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-17 10:46:23 +02:00
hjk
c87a894927 RCC: Use macros not defined in qglobal.h
This prevents conflicts in case of link time optimizations or
precompiled headers are used since we don't include qglobal.h
in the generated code.

Change-Id: I4266c8ae38e6eafefd28b3bde5cb725a24d67ea0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-16 17:40:14 +02:00