Commit Graph

34498 Commits

Author SHA1 Message Date
David Faure
739611221c Add QHeaderView::setFirstSectionMovable(), useful for flat treeviews
QTreeView makes columns movable except for the first one
(since Qt 5.0, see commit e0fc088c0c). This is indeed best
for actual trees, but not when using QTreeView as a flat
multi-column list (with no "root decoration"). Then it should
be possible to move the first column.

[ChangeLog][QtWidgets][QHeaderView] Flat treeviews can now allow
the user to move the first column (like in Qt 4.x) using the new
method QHeaderView::setFirstSectionMovable().

Change-Id: I6b5025e40850bf5c4c373124ee81f657f3f09d29
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-01-02 09:31:11 +00:00
Andy Shaw
a899e45495 DB2: Pass on the native error codes to QSqlError
Since DB2 can potentially have more than one error code, we need to join
these together using ';' as a separator.

Task-number: QTBUG-142
Change-Id: Idd376df84a8e3ae4c05b4722b4d0020fa4f3edad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-02 08:51:06 +00:00
Andy Shaw
fa1397882a Test calling setRelation() with QSqlRelation() clears the relation
Change-Id: I93dbec54bfb9402b9044323862c2ae1d41e1790a
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-01-02 08:50:54 +00:00
Andy Shaw
9b361f0e90 Return an invalid QSqlDatabase when accessing from another thread
QSqlDatabase objects can only be used in the thread that the connection
was opened for. So if the driver was created already then we check if
the thread is correct. If it is not then we output a warning and return
an invalid QSqlDatabase.

[ChangeLog][QtSql][QSqlDatabase] QSqlDatabase::database() will return
an invalid QSqlDatabase if the calling thread does not own the requested
QSqlDatabase.

Task-number: QTBUG-216
Change-Id: Ib5a25aa62129e3925f9819109af05961e5178bc5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-02 08:49:40 +00:00
Samuel Gaist
2b0eb3fac3 Remove use of QRegExp from QSharedMemory
This patch updates the code from QSharedMemory to remove the use
of the deprecated QRegExp class. It also updates the unique key
test to avoid change of behavior going undetected.

Change-Id: I649e615027507898800bb5454a62a6cf8bbb2e18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-30 23:34:00 +00:00
Samuel Gaist
83aca24bc4 Migrate Cocoa QPA backend to use QRegularExpression
This patch updates the Cocoa QPA backend code to use QRegularExpression
in place of the deprecated QRegExp.

Change-Id: I6de2774975e63f8dbff6dad0a842f35c3c4b4f83
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-30 23:33:50 +00:00
Lars Knoll
f3f4f95536 Bump the minimum required version for harfbuzz to 1.6.0
This is the first version that supports Unicode 10.0.0, which
we now require for Qt.

Change-Id: Iff3cb757eb7d97dace5649262c337a4ed1145199
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-12-30 15:17:32 +00:00
Lars Knoll
809200a83e Update bundled HarfBuzz-NG copy to 1.7.4
This is the latest released version, fixing a large amount
of bugs and adding Unicode 10 support.

[ChangeLog] Bundled HarfBuzz-NG copy updated to 1.7.4

Change-Id: Idc8092dfc4e593d64fff2fd51ff9e1b3d84049a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-12-30 15:17:28 +00:00
Alex Trotsenko
89b0364cde QRingBuffer: avoid reallocations of the data
Since its initial implementation, QRingBuffer had the following
fragilities in the architecture:

  - it does not guarantee validity of the pointers, if new data will
    be appended. As an example, passing an address of the QRingBuffer
    chunk as a parameter to the WriteFileEx() function on Windows
    requires the stability of the pointer. So, we can't add new data
    to the QRingBuffer until the overlapped operation completed
    (related issues were fixed for QWindowsPipeWriter and QSerialPort
    in 5.6 branch by introducing an intermediate byte array);
  - inefficient reallocations in reserve(), if a shared chunk was
    inserted in the queue (we can get a reallocation in the place
    where we don't expect it:

      char *writePtr = buffers.last().data() + tail;  <-  line #133

    ).

Proposed solution is to avoid reallocation by allocating a new
block instead. That was accomplished by introducing a QRingChunk
class which operates on a fixed byte array and implements head/tail
pointers strategy for each individual buffer in the queue. So,
QRingBuffer is no longer dependent on QByteArray's internal
shrink/growth algorithms.

Change-Id: I05abab0ad78e22e4815a196037dfc6eff85325d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-30 10:15:10 +00:00
Alex Trotsenko
48ea14080e QNetworkInterface: fix warning of unused function
That causes compilation error in developer build or when '-Werror'
command line argument is forced:

kernel/qnetworkinterface_unix.cpp:142:12: error: 'int getMtu(int, ifreq*)' defined but not used [-Werror=unused-function]
 static int getMtu(int socket, struct ifreq *req)
            ^
cc1plus: all warnings being treated as errors

So, mark 'getMtu()' as unused in the appropriate branches.

Change-Id: Ib4d74845835962bb12f56baf8e13834c032a0404
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-29 13:57:18 +00:00
Lars Knoll
dcc605beb6 Chop a possible trailing \0 from retrieved text
Some apps (e.g. Chromium) explicitly append a \0 to the text they
transmit through the clipboard. Remove that one, when we retrieve the
text, so it doesn't become part of the text we're pasting.

This was e.g. visible when pasting from chromium to the textedit example.

Change-Id: I9445319e6e5ef304a364e14f794b16557a3cc919
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-12-29 08:14:55 +00:00
Christian Ehrlicher
a779d68256 MimeTypeBrowser: avoid memleaks
In MainWindow ctor some member values were allocated without a parent
and not cleaned up in dtor. Fixed it by give them a valid parent so they
get automatically cleaned up. Also m_treeView was initialized twice.

Task-number: QTBUG-61862
Change-Id: I5590b87bb517c55db6eb58e700a5d419c0acdba2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-12-27 18:21:28 +00:00
Albert Astals Cid
d733014019 CUPS: Refactor the code a bit
Move the selected and selDescription members to a subclass of QOptionTreeItem
since it's only ever used for Option type nodes of the tree

Change-Id: Ic99841c4e04a3afcff0950f72abf12977850f6d3
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-27 16:46:38 +00:00
Gabriel de Dietrich
c7faa4ad8f Cocoa QPA: Delete singletons on exit
This involves QCocoaApplicationDelegate and QCocoaMenuLoader.

The former has been modernized to use blocks. The latter was
not being deleted previously.

Change-Id: Ic4cbfed2d9598fa04130675b3330d985b9489a21
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-12-26 21:43:43 +00:00
Christian Ehrlicher
a02b371eb2 QHeaderView: properly connect rows/columnsMoved
QHeaderViewPrivate reimplemented _q_layoutChanged() to handle changes
of rows/columns via layoutChanged/layoutAboutToBeChanged. This worked
fine for Qt4 but since Qt5 only the special signals rowsAboutToBeMoved/
rowsMoved are used for this (8021e2d5e7).
With this change, QAbstractItemViewPrivate::_q_rows/columnsMoved() is
calling the virtual function _q_layoutChanged(). This resulted in a
wrong call of QHP::_q_layoutChanged() for a horizontal header when
a row changed and for a vertical header during a column change. In the
end this can lead to an unhide of hidden sections.

Task-number: QTBUG-54610
Change-Id: Ide4bfc5b24a97746fd1e5af82d3ba08257149157
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-12-22 16:17:56 +00:00
Eskil Abrahamsen Blomfeldt
67b1fa48be Update font when text format's letter spacing type is changed
The QTextFormat::FontLetterSpacingType property was added outside
the span of the FirstFontProperty and LastFontProperty, so
the fontDirty flag would not be set when it was changed. There is
no binary compatible way to fix this before Qt 6, so for now, we
add a special case for it.

[ChangeLog][QtGui][Text] Fixed an issue where changing the letter
spacing type of a QTextCharFormat would not cause its font to
update.

Task-number: QTBUG-65345
Change-Id: I5ab53d7f82d529b57edceacfc3fa688c6741cd17
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: C. Boemann <cbo@boemann.dk>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-12-22 05:37:55 +00:00
Ulf Hermann
ca47afbfaa Fix build with -no-feature-regularexpression
The thing we are looking for in qstandardpaths_unix.cpp is
regularexpression, not QT_BOOTSTRAPPED.

Change-Id: I37eb0cdd8a52b0adfd69f592b84659e8807e35ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-21 18:23:17 +00:00
Ulf Hermann
74027e7f99 Fix build with -no-feature-network
The vnc and tuiotouch plugins depend on network support. The tuiotouch
plugin furthermore depends on a specific feature from network.

Change-Id: I3bc1f7b1dcf3437c6ed0d41cc9e282114a95a39c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-21 18:19:55 +00:00
Thiago Macieira
aad0c8dda1 Fix build with ICC: it miscompiles the F16C intrinsics
By not actually making them intrinsic, leading to linker errors:

 /home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:61: undefined reference to `_mm256_cvtps_ph'
 /home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:76: undefined reference to `_mm256_cvtph_ps'

I had the workaround applied, but only for "intel_icl", the qmake config
for the Intel compiler compatible with MS cl.exe options. The one for
compatibility with Unix cc (intel_icc) was missing.

Task-number: QTBUG-65367
Change-Id: I39332e0a867442d58082fffd15020e4838b6a01d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-21 15:51:08 +00:00
Friedemann Kleint
309169afd9 QScroller: Fix deprecation warning about QDdesktopWidget:::primaryScreen()
In file included from ..\..\include\QtWidgets/qdesktopwidget.h:1:0,
                 from kernel\qt_widgets_pch.h:71:
..\..\include\QtWidgets/../../src/widgets/kernel/qdesktopwidget.h:71:65: note: declared here
     QT_DEPRECATED_X("Use QGuiApplication::primaryScreen()") int primaryScreen() const;

Use QScreen directly and remove the then unused function realDpi().

Change-Id: I526adb09ba35ed0699338d6a8d044c2ff9a03a1e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-21 15:49:44 +00:00
Timur Pocheptsov
54519d7327 Fix signed/unsigned comparison
It breaks a build if warnings are treated as errors.

Task-number: QTBUG-65357
Change-Id: I42d5cbdbd90f831662a6decaebecebef5005e735
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-12-21 15:46:05 +00:00
Gabriel de Dietrich
afb48f21c8 QCocoaNSMenuDelegate: Improve key-equivalent logic
By using NSEvent.characters instead of NSEvent.charactersIgnoringModifiers,
we may miss sending ShortcutOverride events.

For example, when the user presses Cmd-Opt-o, characters will be "ø"
(on a US keyboard layout) and therefore we'll be looking for the wrong
key-equivalent among the menu items. We only fall back on the modified
string when the search on the unmodified string fails.

As and addendum, we also skip any submenu when doing the key search.
This is not necessary since each menu delegate will get called eventually.

Change-Id: Id793315293a02c99e99d793ad812cff7b4a47821
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-12-19 21:42:39 +00:00
Gabriel de Dietrich
e996c74164 QCocoaMenu: Derive custom NSMenu class, make delegate a singleton
Out of the box, this saves one delegate instance per NSMenu. It
also weak-couples the NSMenu instance with its owning QCocoaMenu,
making it safer to inspect from the menu delegate.

In the future, this will be helpful for debugging by just overriding
any NSMenu method.

Change-Id: I7eb801009b97f6a8ee2003306c0e152621bbce54
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-12-19 21:42:31 +00:00
Gabriel de Dietrich
8686f3a347 Conditionally auto-detect Xlib on Darwin platforms
Task-number: QTBUG-65040
Change-Id: I8112d2fac8acf647fc8a669ae5c7920651f0bf08
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-19 19:43:04 +00:00
Alex Trotsenko
7dee74147e Micro-optimize QRingBuffer::chop()
Change the condition to strong equal, as 'bytes' was checked against
wrong value on the start of the function.

Change-Id: Iebd785665ac7bd0941ba4ffd3f315b12efc6ce0b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-19 18:07:59 +00:00
Andre de la Rocha
ac8011c161 Make the Main Window example use high-DPI toolbar icons
The Main Window example generates icons programmatically for its
toolbars. However, these icons are shown with low resolution in a
high-DPI display because the application is not enabling high-DPI
pixmap support.

Change-Id: Id763b707105d02f63162fff2efeb607eb5b59ed1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-12-19 17:57:08 +00:00
Frank Richter
f8b164e1c3 Refactor QXcbKeyboard::updateModifiers()
The current implementation is poorly documented and hides the mapping
between keysyms and modifier bits.
This changeset adds documentation about the inner workings and makes
the keysym/modifier bit mapping reusable. (The latter will be needed for
xkb keymap synthesis if the XKEYBOARD extension is unavailable.)

Change-Id: I70c6d204b2357365db4dafeda680132ab6823ca3
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-12-19 16:18:37 +00:00
Renato Araujo Oliveira Filho
7fd5fe17c2 Fix print to a printer instance
Make sure to use the printer original name as 'cupsPrintFile' function
argument

Testing:
- Create a instance of your print with lpoptions
- Try print a document using the new instance of the printer
- Check if the instance properties was respected

Change-Id: I884b641d1871fe04c7b119c82d4edb4aa41db2f5
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-19 15:23:44 +00:00
Allan Sandfeld Jensen
7951d1cdfa Generate gdb indexing for faster debugging on Linux
If the linker supports it, add the gdb index to the debug symbols, which
makes loading gdb on Qt libraries much faster.

Change-Id: I2ed201c22913b97ac2efaefb5e31636e795ae102
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-19 11:50:12 +00:00
Milian Wolff
e2c10e99db Cleanup: Use QThread::msleep to sleep instead of select
The old code used select with all-zero parameters and a timeval struct
configured to wait for 50ms. This can be drastically simplified by just
calling QThread::msleep which makes the intention much more clear.

Change-Id: I115b56ae67ae2c2cd03354e16a7bfdf56f8c15b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-12-19 09:36:11 +00:00
Ulf Hermann
152033bec0 Make QT_NO_FUTURE a feature
... and make sure we can compile without it. In particular,
Qt Concurrent depends on QFuture, so we specify it as a condition,
and QtConcurrentException should not depend on future but on
concurrent.

Change-Id: I65b158021cecb19f227554cc8b5df7a139fbfe78
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-19 09:17:06 +00:00
Jan Grulich
f76e3712f1 Fix support for flatpak FileChooser portal
FileChooser portal expects filter property in a(sa(us)) format but by
default, using enum, we will end up with a(sa(is)), thus we have to
specify format for the enum.

Change-Id: I7de971197a0c77d6dca092edda7d428d90394574
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-19 08:32:15 +00:00
Renato Araujo Oliveira Filho
ccc9cd4404 Add i18n support for cups advance options
Used 'ppdLocalize' to translate cups options

Change-Id: I7fea7c26194fd6c6ee62a17d3e35d7c2c5be6d3c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-19 08:08:43 +00:00
Albert Astals Cid
ff67dedaaf QPageSetupWidget::setPrinter: Use printdevice default paper size
This means that actually the paper size set on system settings (or lpoptions) is used instead of A4

Change-Id: I2dd86fd9ba210a335773430328b0ba2d3343395f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-19 08:08:23 +00:00
Albert Astals Cid
414a703036 CUPS: Use printer job-hold-until as default instead of the nohold
This also reads the job-hold-until from lpoptions if set there for the particular printer

Change-Id: Ic60fef675ab9f4760cd99ee9ac417b0478459681
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-19 08:08:13 +00:00
Albert Astals Cid
2831fa7665 CUPS: Use printer job-billing as default instead of the empty string
This also reads the job-billing from lpoptions if set there for the particular printer

Change-Id: Ia4a6961de504005b8dcd9209da0624e9ae9ef7e4
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-18 15:24:05 +00:00
Albert Astals Cid
83538a360e CUPS: Use printer job-sheets as default instead of none,none
This also reads the job-sheets from lpoptions if set there for the particular printer

Change-Id: I35aff103261ef58492779071d866e8a15ac78607
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-18 15:23:43 +00:00
Albert Astals Cid
33f08a68c1 Remove declared but undefined QPageSetupWidget constructor
Change-Id: I54022d00d246c83489ccd171170feec1a1a46673
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-18 15:23:35 +00:00
Albert Astals Cid
ad77a2447e CUPS: Use default cups job-priority instead of 50
This also reads the job-priority from lpoptions if set there for the particular printer

Change-Id: I75d983c377d2135a0b0d3e028829a7384a5e1897
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-18 15:23:29 +00:00
Albert Astals Cid
c61810b6f5 CUPS: Fix lpoptions file not being taken into account
This is actually two fixes.
 * We need to call cupsMarkOptions
 * CUPS differentiates between the "" and the nullptr instance, so we need
   to change the call to cupsGetNamedDest accordingly

Change-Id: If2692e405b6b71f8ee91362e6e72eabd9202d704
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-18 10:10:30 +00:00
Marc Mutz
8b8e53f726 QScroller: maintain activeScrollers as a QList, not a QSet
The number of active scrollers is probably very low, so O(N) vs. O(1)
search can be neglected, compared to the higher cost of allocating and
iterating a QSet. The tipping point is that the public API uses QList,
and the QSet needs to be converted toList() on each (external) access.

Just use a QList.

Change-Id: I5f0b37761923dc94d6dbbbf92973da73f5335e4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-12-18 09:21:51 +00:00
Friedemann Kleint
e31c79ece4 QtPrintSupport: Fix build
dialogs/qprintdialog_unix.cpp:1104:21: error: incomplete type 'QTextCodec' used in nested name specifier

Amends b4330bc391.

Task-number: QTBUG-54464
Change-Id: I555431d11a5c3f247d4f055d94255d2708c92374
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-12-18 09:11:25 +00:00
Jan Grulich
84731fbb2b Add support for FileChooser flatpak portal
Adds support for FileChooser Flatpak portal. To support them we just do
specific DBus calls, which are then caught and forwarded by xdg-desktop-
portal daemon/service. This is needed for Qt applications running in
sandbox.

[ChangeLog][Platform Specific Changes][Linux] Added support for flatpak
portals. Flatpak is a software utility for software deployment and
package management. It provides a sandbox environment in which users
can run applications in isolation from the rest of the system. To
communicate with the system flatpak uses portals, which are designed to
be a bridge between sandboxed applications and desktop/system running on
user's computer. Flatpak runs this service (called xdg-desktop-portal)
automatically. It exports the portals via DBus and they are visible by
default to all applications running under Flatpak.

Change-Id: I4de1402434ba7cbcc805eab51c30f84f8ba0c5c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-16 08:17:05 +00:00
Morten Johan Sørvig
91aa782f01 QDrag: Allow setting cursor for IgnoreAction
This is especially useful on macOS where the default
ignore cursor is the pointer cursor.

Change-Id: I5e14814abd2d59a7f4c4cd1029829ebbed5b3017
Task-number: QTBUG-26724
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-15 16:18:24 +00:00
Sergio Martins
60d99b6413 Rework the "failed to find or load QPA plugin" message a bit
This is one of the most frequent problems users ask for help with, and they
don't even know if the plugin was found but not loaded or simply not found.

Qt knows what happened, so communicate it to the user.

Change-Id: I6003ed4ab3d147a5d159b2002004e53c251cb512
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-15 13:54:37 +00:00
Albert Astals Cid
b4330bc391 Reintroduce the Advanced tab in the QPrintPropertiesDialog
This is mostly a revert of 69de617761 adapted to the new code.

The commit that removed this code said:
 a) there's duplicate settings in the advanced tabs and in the rest of the ui: this easily
    solved with a blacklist
 b) you can set these options in the system settings: probably true, but it is very cumbersome
    to go to the printer settings every time i print to select from which tray the
    paper should be used

Task Number: QTBUG-54464

Change-Id: I7b1cacf51006dadb10aa6e00fe6dd2ff748fe576
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-15 13:25:21 +00:00
Morten Johan Sørvig
27f70d7826 macOS: remove existing color-profile handling code
This code is unused/not functional.

Use sRGB everywhere instead. This is not a change
of effective color profile: the backing store has
had the sRGB profile assigned since commit ac899f6d
changed it as a side effect.

Change-Id: Ib45cec3acad90db2a0873b052d6bc4a61c894b18
Task-number: QTBUG-47660
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-15 12:41:05 +00:00
Thiago Macieira
259acdcb8a qfloat16_f16c.c: inline in qfloat16.cpp if F16C is permitted in there
This is going to be the most common scenario for GCC: all recent
versions allow compiling F16C code in the same source, thus generating
better code.

MSVC is excluded unless AVX is already turned on by the user in the
mkspec file, because it fails to use the VEX-prefixed instructions for
everything else, printing a warning that it knows it should have done
so.

ICC is excluded because it's known to generate invalid code when using
the F16C intrinsics unless F16C is turned explicitly on.

Clang is excluded because it runs into an internal error compiling this
code unless F16C is turned explicitly on.

Change-Id: I57a1bd6e0c194530b732fffd14f58de6a46f0de1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-12-15 07:39:54 +00:00
Morten Johan Sørvig
0b4b864d83 Remove testQuitLock from BLACKLIST
Follow-up to d044b0b, with claimed to remove it but
didn’t.

Change-Id: Ifeeb6b062c7c41f1914d677e8aa20e4cb9378ac9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-14 21:07:39 +00:00
Giuseppe D'Angelo
00c09e752f QAbstractItemModel: add more checks in begin{Insert,Remove}{Rows,Columns}
Check that the inserted/removed range is indeed valid.

Change-Id: Ifccbe13f0753252ee1450c8668df782dc699f05b
Reviewed-by: David Faure <david.faure@kdab.com>
2017-12-14 18:15:50 +00:00