Apparently this (undocumented) TESTDATA feature creates resource files,
but lets you use wildcards as well, which is very handy.
The reason I didn't know/realize this when adapting the tests to use a
".qrc"-file* was because some of the test-cases were using relative
paths instead of the 'testDataDir' variable.
This commit fixes the remaining uses of relative paths, removes a
usage of QDir::setCurrent, and adapts QSslSocket to use TESTDATA.
* in now-reverted commit e1600c1a73
Change-Id: Iee6d88f1e0810eeaadac90e7d44bc6db84bfeabf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
The workaround was needed in older versions of MinGW-w64 headers that
did disable some common functions for -std=c++1z. Anyhow, this is not
reproducable anymore with any recent MinGW-w64.
Change-Id: I8e34a2e055f8e2356696dd4fe131a757c1527574
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Removed unneeded \fn commands from two qdoc comments and
moved one of the comments to the file where its function
definition is located.
Change-Id: I4c4371f0541d2995398b0d32e1df409433061226
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
We seem to induce QCoreTextFontEngine to draw text the
wrong way in non-native QMenu popups. Here, we just
delegate menu items' text rendering to AppKit.
This is only a workaround pending a proper fix or better
understanding of the aforementioned issue.
Change-Id: I71088ebe2a534bebca2ad396b1ea6754be093f55
Task-number: QTBUG-65653
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Compiling the default examples should be possible without compile errors.
Task-number: QTBUG-46857
Change-Id: Ie323798df09cdbebc67eb617a7e0ec4c66cb2357
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Remove usage of outdated header.LGPL21 and replace those with proper
one (header.LGPL in src, header.GPL-EXCEPT in tests)
Change-Id: Ia4d1c0d84b77f09787fe7c30670747a1fe2aff29
Reviewed-by: Liang Qi <liang.qi@qt.io>
This removes the need to install an event filter on qApp just for this.
A similar thing was done with setPalette to reduce the number of event filters
in e.g. SystemPalette and Quick Controls.
[ChangeLog][QtGui][QGuiApplication] Added fontChanged signal
Change-Id: Ifa843aa42b91ac63ab17c3b064ac0e764aac77d3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Use the constructor taking a string and convert number unless
it is -1.
Change-Id: I18d1ba2c8e0d3f4af01b7955863967f75051746b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
To avoid the silent exits and potentially dangerous output values, the
caller must supply the correct parameters on input.
Change-Id: Ia9c56940adbf4ad34605a002dfc5c86b32c4658c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Original documentation commit included unresolved link target names.
This fix replaces them with the actual OpenGL function names.
Change-Id: I36a24eb237ef35d7207f3bae0771dc96476d7b19
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Move the modeltest autotest in the right place, and fix the
other autotests that were using it to use the version now in QtTestLib.
Change-Id: Ic6838945f616d580f357c872ce0956c341be3b16
Reviewed-by: David Faure <david.faure@kdab.com>
The referenced static meta object for the superclass might be in a
different DLL. In this case, the whole QMetaObject can't be initialized
all via preinitialized data in the data section of the binary, but must
run code at runtime to fill in the value of the dllimported pointer.
In these cases, both GCC and MSVC initialize as much as possible statically,
while only filling in the dllimported values (QMetaObject::d::superdata)
at runtime. Clang, on the other side, initializes the whole struct
at runtime if some part of it needs runtime initialization, leaving
the struct completely uninitialized before constructors are run.
In C++, there are no guarantees for in what order constructors in
different translation units are executed. This in particular means
that there are no guarantees as to whether qRegisterWidgetsVariant()
in qwidgetsvariants.cpp runs before or after the runtime initialization
of QWidget::staticMetaObject.
With GCC and MSVC, this doesn't seem to have mattered since only the
superdata pointer of the staticMetaObject was uninitialized - everything
else was initialized, and the superdata pointer doesn't seem to be
accessed during qRegisterWidgetsVariant.
With clang, the whole staticMetaObject is uninitialized, unless the
staticMetaObject has been initialized before (and the initialization
order is undefined).
By setting a manual priority (which is a GCC extension that also
clang supports) for the staticMetaObjects, we can be sure that
these are initialized before the actual explicit constructor
invocations (without any explicit initialization priority) that
can access the staticMetaObjects.
Change-Id: I64a82f12d690528567509791bae088b6304e189b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QHeaderView::visualIndexAt() did not calculate the correct position in
right-to-left mode. This lead e.g. to missing vertical grid lines in
QTableView/Widget when scrolling horizontally.
Change-Id: Ia50e5cfd7830a6ad8abd17ff79d9fbb33dc4097c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Remove some c-style casts from int to uint which were needed in Qt3 (or
earlier?) but nowadays the values are all int.
Change-Id: Iecd739c450873adf952a17f635d7fb6825537907
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
As the HANA ODBC driver does not provide scrollable
results per default, the connection has to be established
with a specific option.
Change-Id: I14751a94f61d6fffd6d56c39076c24ec4d1f88ef
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joachim Puhr <jpuhr@gmx.de>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
AKA the model tester, living in QtTestLib now.
Underwent some significant refactoring from the original modeltester:
in particular, it will stop testing illegal indices.
[ChangeLog][QtTestLib] Added QAbstractItemModelTester, a class
to help testing item models.
Change-Id: I0e5efed7217330be11465ce3abb3590f3f2601a4
Reviewed-by: David Faure <david.faure@kdab.com>
Change the condition to strong equal, as 'bytes' was checked against
wrong value on the start of the function.
Change-Id: I4ec4768b9fff3292af233417c4a5862d72d4eeac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
There were several problems that i've fixed in a single commit since they are very interwinded
* The dialog used QPageSize::Custom for two things, the custom sizes coming from
the printer and the "user can write whatever size they want" size. Now only
the printer custom sizes use QPageSize::Custom and we use m_realCustomPageSizeIndex
for the "user can write whatever size they want" one.
* The dialog stored the QPageSize id as the combo userData, that doesn't work
when the printer has multiple custom sizes since they all share QPageSize::Custom
so now it stores the QPageSize itself
Task-number: QTBUG-58733
Change-Id: Ie640a07bb5e24b753db83c091c836e8af4ff126c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
We need to update the printer output format and the current print device
when changing the printer so that if the user opens the properties dialog
for that printer it reflects correctly the selected printer.
Change-Id: Ib6767a74b74b8eebe43ff17006b6105c483a08b6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
No need to call PQgetvalue() before PQgetisnull().
Change-Id: Ie83ee577b082dbe9d9ca2e86212a281abebdde6e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The code used to fall back to anonymous login independently for username
and password; however, it should only use a fall-back password if the
username is missing or (case-insensitive) "anonymous". When a
non-anonymous username is given without password, we should simply skip
he PASS message to FTP.
If the FTP server requests a password, in the latter case, QFtp will
signal authenticationRequired; in all cases, if the server rejects the
given credentials, QFtp signals authenticationFailed. Either way, the
client code can then query the user for credentials as usual.
Task-number: QTBUG-25033
Change-Id: I2a4a3b2725819ab19c8a7e4baa431af539edcd8d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
setData()'s default implementation for QListWidget, QTableWidget, and
QTreeWidget treats Qt::EditRole and Qt::DisplayRole as referring to the
same data. Used the same sentence from QStandardItem::setData for
consistency.
Task-number: QTBUG-11549
Change-Id: I41d06bdaaa8e7d4a86e24147b3d8222ad7823a6c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
qt5_add_binary_resources() macro did not recompile for CMake generated
input before this patch.
Adding the input files to the DEPENDS option corrects this issue:
Task-number: QTBUG-60714
Change-Id: I0f46918c6f1079fed7ee1b21305b18ff38f863f8
Reviewed-by: David Faure <david.faure@kdab.com>
Change-Id: I981e4bfdf679bf755665748e9d3b389a94561e55
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
When applying fallback fonts to characters that are joined by
ZWJ or ZWNJ, we also have to set the same font for the control
characters, otherwise we will split the text and the necessary
shaping will not take place. This was reported for emojis, but
will probably also happen for Indic scripts where joiners are
used predominately.
[ChangeLog][QtGui][Text] Fixed ZWJ and ZWNJ control characters
when fallback fonts are in use.
Task-number: QTBUG-65519
Change-Id: Ia37233f3319b95af68ae6053c29997eac65448e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
After we stopped sanitizing the fallback font list (with change
6ca48a847a), we now need to make
sure it is ordered so that the fonts that support the writing
system in question are always tested first, otherwise we can end up
loading a lot of fonts that will never be used.
Task-number: QTBUG-65605
Change-Id: Id2a65bbff3e64e6d6e6b4f72500778ee3e811e84
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Introduce a special hash modeled on the one used for QFileSystemWatcher
on Windows.
Task-number: QTBUG-31103
Task-number: QTBUG-64147
Change-Id: I69ebabe841716e4957ae3fb04fa5c43d233a3552
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
With libinput we now get a hardcoded resolution that is unrelated to
the hardware. So avoid using that as a real pixel delta and document
pixel deltas as being driver specific and unreliable on X11.
Task-number: QTBUG-59261
Change-Id: I9fe86d80e7ccd290ed2e4091d7eafa52cb537d34
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Then we don't need to add a leading slash. (minor clean-up)
Change-Id: I86af224841009fda838e7cb89d47d324963328c9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This reverts commit e1600c1a73.
The commit missed the fact that TESTDATA exists. Which supports
wildcards and then can automatically pick up new files when added (as
long as they match a wildcard) and then you don't need to maintain a
giant qrc file.
Change-Id: Ie31fadb5ef6e8dfe6105f4f9764292f78cffb512
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Old header.LGPL21 header was used at some files. Replase those with
new header.LGPL one
Remove old header.LGPL21
Task-number: QTBUG-57147
Change-Id: I650e39024ed4876bba27e954c7d61fdb025b46ef
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Rewrite the loop using QGuiApplication::allWindows() to avoid
the creation of temporary containers by
QApplication::topLevelWidgets() and expensive checks.
Task-number: QTBUG-64072
Change-Id: I56ef29b12f7bcbe274f3e00a6007d75d33f22b10
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Someone, almost certainly this writer, undefed Q_GADGET for
qdoc, but this was a mistake that caused clang to report a
lot of errors for undefined variable. The undef of Q_GADGET
is now removed.
Change-Id: I39fb09443110b60bbcb16cf350f38c1eac773d8a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Some old uses of Q_QDOC to prevent the old qdoc C++ parser
from seeing declarations it didn't need to see were preventing
clang from seeing declarations it did need to see. These have
been removed, and some internal documentation has been added to
account for some declarations that suddenly became public but
should not be seen in the Qt API.
Change-Id: Iccf423e5cf8767f0a271150ab59bea54cf90ac46
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
It caused a compile-time assert in clang that should not have occurred.
It is now moved passed the assert macro.
Change-Id: I8311992617de7837ca4604fcc3e5afb17dcda65d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
clang-qdoc understands Q_OBJECT, so it sees the declarations
that appear there.
Change-Id: I669be13af59269a0e108e0988d9b4f7779274c7c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>