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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Follow-up to d044b0b, with claimed to remove it but
didn’t.
Change-Id: Ifeeb6b062c7c41f1914d677e8aa20e4cb9378ac9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Check that the inserted/removed range is indeed valid.
Change-Id: Ifccbe13f0753252ee1450c8668df782dc699f05b
Reviewed-by: David Faure <david.faure@kdab.com>