In Qt5 the meta-data format will be changed to not store the
method signature string explicitly; the signature will be
reconstructed on demand from the method name and parameter type
information.
The QMetaMethod::signature() method returns a const char pointer.
Changing the return type to QByteArray can lead to silent bugs due to
the implicit conversion to char *. Even though it's a source-
incompatible change, it's therefore better to introduce a new
function, methodSignature(), and remove the old signature().
Task-number: QTBUG-24154
Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Clear away Q_WS_WIN/Q_WS_X11 from QMenu. Using the hint returned by the
QPlatformTheme.
Task-number: QTBUG-24325
Change-Id: Iaa4da26c74273d7cfc1fbec6519c52d09e10f7bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
- Fix key handling in QWidgetLineControl according to
the keyboard scheme returned by the QPlatformTheme,
remove #ifdefs.
- Do the same in the test.
Task-number: QTBUG-21402
Change-Id: I36d836584e7122309061af72819a4147cadd0a74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
It might be silly to have sections with size 0 without using hideSection.
Nevertheless we should still use the principle of least surprise.
It does not make sense that hiding a row 'far' away should affect
the semantics of setOffsetToSectionPosition on lower indexes.
Change-Id: Iaf847eba2ea4d28fc7bcfe3a27d62f432f6f61e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
remove "header" and assignmets which are defaults or bogus,
reorder some assignments.
Change-Id: I67403872168c890ca3b696753ceb01c605d19be7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Since we would add 1 to the height of script lines in the layout before
and there was no compensation for this in the box font engine, which is
used by this test, the selection rect in the test images was one pixel too
high. Now that the +1 has been removed from the height, the images have to
be updated.
Change-Id: Ic9ea0ace6b61be496846c7f757ae309756cd9f5f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
If QMainWindow::restoreState() then QWidget::setStylesheet() were called
before the QMainWindow is shown, the size of QDockWidget can not be
restored.
QWidget::setStylesheet() will generate QEvent::StyleChange event, which will
cause the function QDockAreaLayout::fitLayout() to be called before the layout
of MainWindow is activated. Although the state info has been stored in
a QMainWindowLayoutState variable by QMainWindow::restoreState(), but
QMainWindowLayout::setGeometry() still isn't called at present. So
QDockAreaLayout::fitLayout() will force the size of dockwidgets
and centralwidget to be calculated using the wrong geometry, which will
break the state restored by QMainWindow::restoreState().
This is a side effect of 692e9103ebb85b90e79377206d5d03b704d43d42.
Task-number: QTBUG-15080
Change-Id: I8cda6a529d178f7467a59b780db80df0a44d4769
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
- Replace Q_WS_WIN with Q_OS_WIN
- Remove useless #ifdef Q_OS_WINCE which located in another #ifdef
Q_OS_WINCE
Change-Id: I6279b6d74902ab3ca6bdb7292c2936a76e3e6952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Use QFINDTESTDATA to locate the helper applications.
Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The tab key behavior in Qt5 no longer respects the "Text boxes and lists
only" tab navigation option in OSX, which is the default. This is a
regression since Qt4.
Task-number: QTBUG-24372
Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This autotest seems to be caught in an event loop preventing further
correct signalling. Mark test function skipped with QSKIP.
Task-number: QTBUG-24374
Change-Id: Ic943a33b71fa87d0873278cb7b7b134c22602be3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Marked a bunch of tests insignificant, and skipped one crashing test
case in QApplication test, as that couldn't be made to pass simply by
marking the test insignificant.
Once the underlying issues are fixed, the tests need to be re-enabled.
Task-number: QTBUG-24203
Change-Id: I9aea4fa207d307793445efdcaead72219fbf6c4f
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This is similar to the focusColors() failures in QTBUG-23686.
Task-number: QTBUG-23686
Change-Id: I1f01a4e41e61a7a664309be34cfa4fe916a92b15
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
All of these tests currently hang.
Task-number: QTBUG-24321
Change-Id: I7664b57f6539d4c03008701da66e193019a4440a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
tst_QColorDialog::native_activeModalWidget() hangs, so skip this test.
tst_QColorDialog::task247349_alpha() fails, so XFAIL this failure.
Task-number: QTBUG-24320
Change-Id: Ie4d69e07063e9a648ec4fa3337274143a52ea3e3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The first block of tst_QApplication::quitOnLastWindowClosed() hangs
on Mac OS X, so skip that block for now.
tst_QApplication::testDeleteLAter() both hangs and fails on Mac OS X,
so skip the test and XFAIL the failure.
Task-number: QTBUG-24318
Task-number: QTBUG-24319
Change-Id: Ice11292d84e63215f1bb9e03f3ef369943d1d887
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
- Move palette() from deprecated QtWidgets/QGuiPlatformPlugin
to QtGui/QPlatformTheme, Make it return a const * since
QPalette does not have isNull().
- Initialize QGuiApplication::palette() and
QApplication::systemPalette() from it.
- Do not initialize QPalette from QGuiApplication::palette()
unless app_pal is non-null (default to Qt::black if it is 0).
This avoids initialization order crashes/recursions in the
QPA plugin. Streamline initialization function.
- Remove styleName(), systemIconThemeName() and iconSearchPaths()
from QGuiPlatformPlugin and re-add them as
QPlatformTheme::themeHint().
- Remove styleHint() from QGuiPlatformPlugin, add it to
QPlatformTheme::themeHint().
- Add UNIX themes with factory function (Generic,
KDE, Gnome), taking it from Qt 4.8 code (stripping the
KDE 3 code).
- Implement Windows palettes.
Task-number: QTBUG-24204
Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
The architecture is detected at compile time based on the predefined
macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf
files. The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present
in the current copy of src/3rdparty/libpng, so no change in
functionality is expected.
The conditional for the SUPPORT_JIT define in pcre.pri is moved to
src/3rdparty/pcre/config.h, again so that we can use the compiler's
predefined macros to detect the architecture at compile time.
Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their
Q_PROCESSOR_* equivalents.
Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with
their Q_OS_* equivalents.
Note that this commit also effectively disables the SPARC atomic
implementation. An inline implementation for SPARC needs to be added,
or we remove the current code and instead rely on the GCC intrinsic or
C++11 std::atomic support on SPARC.
Note also that this commit does not remove QT_ARCH from configure or
qconfig.h. This will continue to be set until all Qt 5 projects can be
moved away from using QT_ARCH.
Change-Id: I5de747cc4436d21941329974cff3016970f497b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Instead of refcounting QWindow visibility, we ask the Application
subclass whether quitting is appropriate.
Task-Id: QTBUG-24120
Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
There are no rights for typical user or even administrator to write
directly under c:\ root in windows without rights elevation, so
completionOnLevelAfterRoot() test case failed. Changed the test case
to use an existing directory.
Task-number: QTBUG-24289
Change-Id: I6a8dfc9d1d6ae798b3b9049c542b45fdbdbd9a8c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The XFAILed initStyleOption() case passes on Windows, so do not XFAIL
it there.
Task-number: QTBUG-24297
Change-Id: I9615c408aa7e72b5eb8fe9739903594e45eb5fd7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This fixes a minor bug in VisualIndex triggered when calling
resizeSection with size 0 (but not hideSection).
It is mostly cosmetics - however hopefully there will soon
be a minor refactoring and there is really no need to make
strange code to keep a semantic bug.
However it is also doubtful to make a semantic change
while refactoring.
Change-Id: Ide153e421fd7a634062cb74867f4a49da4bf9cd6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Window system Macros where deprecated so use
Q_OS_WINCE for now. This code will need
some refactoring, but this is the first
step to it.
Change-Id: I5876b80ee45d4b38ac63fc7d51e775dc70bbd485
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
When text has been selected in a QTextEdit and the left or right arrow
key is pressed, the cursor moves one character beyond the start or end
of the selection, when it shouldn't move past the selection. Fixed by
moving the cursor to the right place when a selection is active.
Task-number: QTBUG-22853
Change-Id: I9ea1863436db98627a6fd041ce554cf10be26493
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
(cherry picked from commit 1b031759ddfdab9703dfecac13f1ed318da3dafe)
QTest::ignoreMessage() cannot be called when creating test data rows,
but rather must be called when executing a row.
Change-Id: Ic958c4e5c15dd53a48479099b6b07803af6cb789
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This has only been around as compatibility interface for Qt4
but is now replaced by QPlatformInputContext.
Change-Id: I677dbbea46311bf39f6c5ca9dc3fb5009abe924a
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
In order to keep binary compatibility, Qt 4 introduced V{2,3,4}
classes for QStyleOption subclasses. They're simple, low level
containers for various members with public access (no accessors
required).
In Qt 5.0 we can break BC, so this patch moves the members
from the derived classes into the ``base'' ones.
The ``base'' ones get a version bump matching the highest
version available, and the V{2,3,4} classes become typedefs.
This change can cause problems in code that used QStyleOption
directly, especially QStyleOptionViewItem, because the old V4
fields get default initialization but the QStyle subclasses
detect that the option is a V4 option and expect all fields
to be properly initialized. The fix in such places is to
properly initialize all fields.
Task-number: QTBUG-23522
Change-Id: I2f782da09ca5cc8c4cbafc07448fb0d33153a251
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QInputMethod better describes what the class is about, input methods
in general, be they panels or just composing input from key events.
Compatability headers added for old name. Not bulletproof but should be
enough to get transition done.
Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
- Changed qtextbrowser unittest to use TESTDATA and QFINDTESTDATA
Change-Id: I0ac7c990640d492d5ec94f5824c022a2b5075103
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Changed qlabel unittest to use TESTDATA and QFINDTESTDATA
Change-Id: Ide6755cd79caf91b553fb6b1412da6fbab583720
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This provides a stronger mechanism e.g when inheriting QItemDelegate.
It makes some things much easier e.g avoid delete of an editor
and maybe only delete depending on what the editor says itself.
This introduces a new virtual function.
Task-number: QTBUG-2299
Change-Id: I8410f8199775987dbacffd99e4c354fdadcdd21f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This is a test that verifies correct behaviour of qheaderview.
It includes test of swapSections, moveSection, rowcount-change,
resizeSection, hideSection and position lookup.
Change-Id: Idc1fe8167f2d95dee5c5b1161cb633cbf9495d17
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This patch removes the posibility to call resizeSection
with negative sizes.
Sections with negative sizes affect the other sections,
and it does not seem to have a useful, well-defined semantic.
The length can also become negative - and visualIndexAt
work strange.
Change-Id: I632beb160649fa10e2106314557b8c5a106aa3cf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
A feature of a ref-counted quit (managed by a quit-lock class)
is added to both QEventLoop and QCoreApplication.
This allows, for example, an event loop to quit() when there is
no more work for it to do.
quitOnLastWindowClosed is implemented in terms of the refcount in
QCoreApplication so that jobs can be completed before the
application quits.
Change-Id: I14c8f4e7ee12bbf81a6e5849290d4c8ff37fa110
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Remove methods that have been marked as deprecated
before Qt 4.6. Keep others, but inline them
where possible and mark them as QT_DEPRECATED_SINCE(5, 0).
Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This allows QStandardItemModel to be usable in QML without requiring
clients to subclass it.
Task-number: QTBUG-15067
Change-Id: I867fcd8137132affdf21f37a9fa293e855a09a13
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QIntValidator and QDoubleValidator used to accept C formatted input if
the input wasn't valid in the default locale. This change removes this,
only the default locale is now used.
Change-Id: I8b2d8f9f3849abe3fcb5c12083aae542a76eaf90
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
- Changed to use TESTDATA and installTestHelperApp()
- Changed to use QFINDTESTDATA instead of currentPath()
Change-Id: Ia24ebc758d5d0fdfcca951500766adefbcf9fe93
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>