Use SW_SHOWNORMAL instead SW_SHOWNOACTIVATE as a parameter to
ShowWindow() to enforce the window to be restored to normal state,
even if the state before minimized was maximized.
Task-number: QTBUG-48449
Change-Id: I9436623b1495f574a72050e50e8b31bfc83ced5c
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Since we are storing pointers to the elements of the
vector thus copied, we better make sure we don't cause
it to deep-copy. The old code was fragile in that sense,
using a reference removes one layer of potential mess-ups.
Change-Id: Ib8ebbb47c2a478b5e666e767d05429700b528afd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Scope some variables better and drag a constant
expression out of the loop, at the expense of
executing it unconditionally. That should not
be a problem, as all operands of the expression
are calls to const member functions.
Change-Id: Ibcf54b2e2faf9a818df7d12c0790c1f173c8a8ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
More efficient, because control block and tracked object
are co-located in a single memory allocation.
Change-Id: Ibd1a37836b96837afd6209a743a05a727dbc9907
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Make it opt-in because doing a normal backingstore flush does not seem to
work on Cocoa once we use OpenGL on the window. Windows and Linux should
be able to cope with this.
This means that platforms outside Windows and Linux will continue to have
the problem of having GL-based compositing enabled for ever after having a
QOpenGL/QuickWidget shown in the window once, but the issue is most
prevalent on Windows anyway, OS X machines can deal with OpenGL better
in general.
Task-number: QTBUG-49172
Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This is needed to be able to use Qt (with dynamic ANGLE) in a plugin
while the host runs a different version of Qt (and ANGLE).
In addition to changing the LIBEGL_NAME and LIBGLESV2_NAME variables
you also need to update the value of the LIBRARY definition in the
.def files for ANGLE:
qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2[d?].def
qtbase/src/3rdparty/angle/src/libGLESv2/libEGL[d?].def
Task-number: QTBUG-48431
Change-Id: Idd00d039ba3e20cc0ec7496bee36ed1c90383b0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The new API has been available since 10.6 or 10.7 and the debugger
indicates it simply calls through to TransformProcessType.
Change-Id: Ia8f82d7426cb409aca8fd5feb8e43e1b0e79f8f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This function is introduced to safely provide poll(2)-like semantics for
socket multiplexing on Unix-like platforms. For platforms where no poll
system call is available, an implementation based on select(2) is provided.
Change-Id: I320e97dae5924316675a74d1897c48cae292ac6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Without this patch, setLayoutDirection() is called only by LanguageChange
event handling, which triggers only upon installing, removing, or clearing
QTranslators.
This caused two problems:
* If the QTranslators are installed in a Q_COREAPP_STARTUP_FUNCTION the
event is lost since the QGuiApplication is still not there.
* If the application doesn't use QTranslators at all, i.e., uses gettext,
some other translation system, or because it has no messages at all,
setLayoutDirection() is never called and the layout direction is wrong.
The initialization of layout_direction has been changed from
Qt::LeftToRight to Qt::LayoutDirectionAuto but that has no
impact since QGuiApplication::layoutDirection will make sure
Qt::LeftToRight is returned if layout_direction has still not been set.
Change-Id: Ic60fe9a318c8afe1c503e3796ec54cfc687e7164
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Visual Studio version specific changes have been added to msvc-
desktop.conf which is not used in WinRT or Windows Phone related builds.
Hence take a similar approach to gcc and introduce msvc-base to be used
by all configurations for common settings.
For WinRT this will only be applied to msvc2015 and later on to not
introduce any regressions or behavior changes for previous versions.
Change-Id: Ib1a4d539d46d788470c00cb5969fee74a803bd67
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
don't install the module .pri file into qtbase even when doing a
non-prefix build.
this has no effect on modules built as part of a top-level build, as
they announce themselves via .qmake.super anyway.
however, modules built separately become unavailable unless QMAKEPATH
or QMAKEMODULES is set. this is deemed not relevant by the original
audience of this feature (the qtwebkit team).
Change-Id: I14c170b2c5dbb99608939aef1a541563d5b755d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Don't reuse 'w' as the loop variable for every loop in the
(very long) function. Scope the variable closer, or, where
there are no natural scopes, define a new variable.
Required turning some while loops into (more natural) for
loops.
Change-Id: I7d1a52503aeb19cd76be22153ba3d0961bd44cae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
With the addition of Qt::AA_EnableHighDpiScaling testing
of the env. variable only is no longer sufficient.
Use QHighDpiScaling::isActive() instead, which is
available at the time loadAndroidStyle is called.
Change-Id: Iaa6bbb5a04a71fa3bd68f3bdc8c8bcdfb5d1778f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
If we want to sort according to file types, we're also
sorting user visible strings. For that we can also use the
natural comparison collator, as file types should be case
insensitive, and won't contain numbers. And even if they do
a natual sorting will make it easier for the end user to find
what they are looking for.
Change-Id: Ie1d7d0af041a08be0f0d1a4eeb2eae9be885ffc7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The old code was extremely inefficient, and QCollator
can provide the same functionality in a much better
and faster way.
Task-number: QTBUG-30902
Change-Id: Iaf5dbe587d9a6ebca26885259fdee74a29d3c84f
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
QVariant was using QColor::name() to convert a color to string, which by
default loses alpha value. The patch is fixing the problem by always
including the alpha value in the string when required.
[ChangeLog][Core][Variant] QVariant(QColor)::toString() uses
QColor::HexArgb format when the alpha component is different from 1.
Task-number: QTBUG-37851
Change-Id: I887460c1ea151180ba99d64dd873ba9d6e2268f2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
QKeySequence::PortableText is the default value for argument passed
to QKeySequence::toString(), and it doesn't need to be mentioned
specifically in description for Qt::AA_MacDontSwapCtrlAndMeta enum
value.
Dropping the parameter shortens the text string, allows browser to
better wrap the table text, and gets rid of the automatic horizontal
scrollbar in online style. This improves readability for the entire
table.
Change-Id: I7051f5415a7a100b8c76f23b06b6cb9a2b0699ef
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
These additional styles enable the use of lower and uppercase
alphabets to number the list items. They are useful especially
in nested ordered lists where numbering all the list items
using decimal numbers could be confusing.
Change-Id: If1bdf98ff37c2c191d66dfb66a3e8f20d8fa83e5
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Fix the ARGB32 NEON-optimized drawhelpers so they also build on AArch64.
The RGB16 NEON-drawhelpers are not converted as they use more assembly.
Change-Id: I8b75fadf5bad74360a2ab6aec9a6bf50df80c1b9
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Later changes will subclass this class. Moving to the header now
for better readable patches.
Change-Id: If17607d69169aa5c449c36c9445308164e387f29
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
It's been a while since we stopped supporting that version :)
Change-Id: I2fa4900945551024ac920c36c47d20b47aee50c0
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
OS X and iOS do have a flag for this in their API, but it does
not seem to work. We can't support this on Linux without ICU.
Change-Id: I81613ad425cb054597f23fac112be665f8d958b6
Task-number: QTBUG-41978
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Hyperlink added in QTextDocument becomes "<span>" tag after exporting
the document to ODF with QTextDocumentWriter. Fixed by adding "<a>" tag
around it with attribute "href" pointing to hyperlink location.
Task-number: QTBUG-48853
Change-Id: I2bd689a88c9d0a5b14369777718b9cb36e4cfa19
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
If, after checking a condition, we issue a qFatal()
or a qCritical(), by definition that check is
unlikely to be true.
Tell the compiler so it can move the error handling
code out of the normal code path to increase the
effective icache size.
Moved conditional code around where possible so that
we could always use Q_UNLIKELY, instead of having to
revert to Q_LIKELY here and there.
In some cases, simplified the expressions newly wrapped
in Q_UNLIKELY as a drive-by.
Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
More efficient, because control block and tracked object
are co-located in a single memory allocation.
Change-Id: Id18e2d06db43568eb34c2e2d129d1b116af73acb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
"ssl" should be defined when "openssl" is defined, and WinCE should
default to autodetection of OpenSSL.
Change-Id: I5693923ba2d3fea1a670df556c107e6ff75e6575
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The only tricky part here is to take the size of the moved-to
member, not the moved-from parameter QString object.
To avoid accidents, give the lvalue version the same structure.
Change-Id: Ic68bb896f1d817c21d913feab43522235c51029b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
...even if reserve() hasn't been called before.
[ChangeLog][QtCore][QVector] resize() will no longer shrink the
capacity. That means resize(0) now reliably preserves capacity().
Task-number: QTBUG-39293
Done-with: Robin Burchell <robin.burchell@viroteck.net>
Change-Id: Ie7e4e597126832990b6cfb83bba875c3963b143e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The code path is called for up- and downloads, yet the error
message talks about "Error downloading...".
Make this "Error transferring..." for a more neutral statement.
Change-Id: Ifbca6a95058042b195cdbeec339ef27a231491b2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
De-inline the method, and return the file info that's already being
cached by the model.
This is ok to do in a minor release, as apps compiled against an older
version of Qt will simply continue to use the less efficient
implementation.
Change-Id: I164c7961a8cf97447638af316512326442767dd8
Task-number: QTBUG-30902
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
For qDebug() and qWarning(), this is just an optimization.
For qCritical(), which can be fatal, the old code was just wrong.
Change-Id: I6d8ab1d7531d766cd41b49569dc0fd4420ecab8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This information is already registered by the QMessageLogger ctor.
Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only
a string literal remained, converted to printf-style qDebug() on the
go.
Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When streaming non-Q_FLAG QFlags, factor the common code
into a helper function only templated on QFlags<T>::Int
and pass what varies as parameters.
Then overload the helper function for the most common int
type (int) as an out-of-line function, implemented via the
primary template to avoid the two going out of sync.
That leaves the primary helper template only for special
cases (such as future extensions).
Change-Id: I70e0001bcfacab9f8765c9b1075fe80b596223f1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
What triggered this change was the use of QVector::toList() in
op<<(QDebug, QVector).
Only added support for STL types of which we already include the
headers.
[ChangeLog][QtCore][QDebug] Can now output std::vector, std::list,
std::map, and std::multimap.
Change-Id: I49581e3038daa7626b00169430b72d3d5175eae7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The driver causes crashes when switching orientation in full screen mode.
Task-number: QTBUG-49541
Change-Id: I8293d4b2f2981fa627654d06894a74c922304ac3
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
In QMenuPrivate::hideMenu(), delay clearing of 'causedPopup.widget'
to after the QMenu::close() call, so that it is still accessible
in QMenu::hideEvent() which calls QMenuBarPrivate::setCurrentAction(0)
if the caused widget is a QMenuBar.
Task-number: QTBUG-47377
Task-number: QTBUG-49592
Change-Id: Idbda48e918dae799afea84068a60d7383d7b4971
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>