Commit Graph

95 Commits

Author SHA1 Message Date
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Friedemann Kleint
40eaa72319 Do not run tst_qfilesystemmodel for MinGW.
Task-number: QTBUG-29403

Change-Id: I91c938d9a6510ae91e54cd53e2d9df0a56b68d50
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-02-01 09:18:42 +01:00
Friedemann Kleint
00ad768f10 Do not execute tst_qfilesystemmodel in parallel.
It may interfere with other file system tests.

Task-number: QTBUG-29014
Change-Id: I32dd7428993b0da1a2f70ec3e581050012a4ff32
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-29 07:30:45 +01:00
Friedemann Kleint
322055b9c9 tst_qfilesystemmodel: Avoid commonly used folders.
Use the test's temporary directory instead of
QDir::temp() and the documents folder
instead of QDir::home(). Split out unrelated test
from data-driven sort test.

Task-number: QTBUG-29014

Change-Id: I229f0b1c0f1e43b56d19ebd43fd7cc64a85b1222
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 09:41:39 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Friedemann Kleint
54fd35b134 Fix warnings about not being able to set Window geometry on Windows.
Fully decorated windows cannot be smaller than 160x30 (Large fonts).
Enlarge Windows or remove Window frame  to get rid of decorations.

Task-number: QTBUG-28611
Change-Id: Idb6ee94fb8d0760d5f97042b3084557f11e9fdf9
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-08 13:54:04 +01:00
Stephen Kelly
ba82958af9 Widgets: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-04 18:44:31 +01:00
Stephen Kelly
4319f698c8 Remove metatype registration of built-in types.
As they are built-in, they are effectively registered at compile-time
already.

Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 16:15:37 +01:00
Sergio Ahumada
0df026de86 Stop using the name "Trolltech" in QSettings
Also change Trolltech for QtProject in other places

Task-number: QTBUG-23269
Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-03 03:47:08 +01:00
J-P Nurmi
27aa41cbba Made QMacStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QMacStyle directly.

Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-11-23 15:18:15 +01:00
J-P Nurmi
39dd8bbfab tst_qwizard: remove redundant include
Change-Id: I837aed1e5e601e67105562df2764327b7e8c44a6
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-23 15:15:20 +01:00
Samuli Piippo
5208de1691 tests: Mark tst_qfilesystemmodel as insignificant on Mac
Task-number: QTBUG-27890

Change-Id: I8af9f019c00d38551ce04b4cdb4bb895a61a50c5
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-11-13 07:59:40 +01:00
Friedemann Kleint
d0aa81ee10 Fix a crash in QFileDialog when selecting an invalid name filter.
When nameDetailsVisible is set to false and an invalid/empty
string is passed to selectNameFilter(), the regexp used to
strip the filter off the suffixes returns empty and a crash
occurs.

Change-Id: I926ea49514ff25a103977d8121fca1cf83d647f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-26 11:51:56 +02:00
Sergio Ahumada
b8dd9e3041 test: Remove QSKIP from tst_QFileDialog2
In task227930_correctNavigationKeyboardBehavior()

Task-number: QTBUG-23602
Change-Id: I07f40dbc3840c232e09ff1327f00e3fd9c16c22f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-25 16:22:50 +02:00
Stephen Kelly
dee57bc910 Core/kernel: Make some signals private.
There are more opportunities in QtCore and the rest of Qt to make signals
private instead of public. This is a test-dart to see if there is any
reason not to do this.

It would be nice to make QObject::destroyed private, but as it has a
default argument it would be source incompatible to anyone connecting
to the SIGNAL(destroyed()) instead of SIGNAL(destroyed(QObject*)).

Currently the function-pointer-based connect syntax does not accept
a functor (or lambda) with a different number of arguments than the
signal. Olivier says a fix for that might come in 5.1, but for now
the qfiledialog2 test is changed to not use that anymore.

Also, the function pointer for a private signal can not be assigned to
a local variable, so the qmetamethod test is changed to not do so
anymore.

Change-Id: Iaf776b822f9ba364f2c184df0c6b23811da56e44
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-25 15:56:14 +02:00
Miikka Heikkinen
32cbcca911 Stabilize tst_qfontdialog test case.
The delayed quit signal used as failsafe to ensure exit from event
loops interfere with later test if the test case works normally,
as closing the last toplevel window will also exit the event loop.

Fixed by stopping the quit timer if nested application exec loop
is exited.

Change-Id: If87655f1f28f50e27a64f3430c9f65bb3ab7dd70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-10-23 12:03:50 +02:00
Jens Bache-Wiig
087e4bc517 Remove Cleanlooks and Plastique
We have a new style Fusion that will replace these styles.
They will be moved to a separate
module rather than included in platforms that do not need them.

Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-22 19:36:43 +02:00
Marc Mutz
bb73c085a6 normalise signal/slot signatures [QtWidgets tests]
Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-19 00:44:54 +02:00
Rohan McGovern
0776746d47 tst_qfiledialog: fixed typo causing semi-random completer() failure
completer_data() was attempting to find the first folder which did
not begin with a '.' character under QDir::root() for usage during the
test.

However, a typo caused it to find the first folder even if it _did_
begin with a '.'; unless the first folder returned by entryList()
was ".", in which case no folder would be found.

Change-Id: Ie95f1add797973d06a8d5f2fa32935366a008de5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-09 00:25:57 +02:00
Teemu Katajisto
7615b54ce8 Run application main run loop in color/font dialog test
In cocoa the timers are associated with main run loop but
the way font and color dialog tests are executed the modal
dialog run loop is only run in cocoa. This causes timers to
not to fire and test cases to hang.

Unfortunately this does not completely fix the test failure
because the QTest::keyClick is not working with cocoa
native dialog helpers and therefore the tests are marked
with QEXPECT_FAIL.

Task-number: QTBUG-24320
Task-number: QTBUG-24321

Change-Id: I88740a20ad2b794b6ca15e1b6455f436ffd39335
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-09-27 23:51:30 +02:00
J-P Nurmi
f7ae890e24 tst_QDialog: fix Q_OS_WINCE & QT_NO_SIZEGRIP usage
Change-Id: I443381ef4f10492eeda0fc681c390e0cd4d4125e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-27 06:07:11 +02:00
J-P Nurmi
12130ff65f tst_qsidebar: remove duplicate code
Change-Id: I8ee59022199fda7ea56891a2f924954cb4aefa42
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-27 06:07:10 +02:00
J-P Nurmi
a86b3d76a5 tst_QMessageBox: fix Q_OS_MAC usage
Change-Id: I1a3c1c88956d85343e693588ca0522c4b7d62072
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-27 02:31:11 +02:00
Marc Mutz
0842d32441 QFileSystemModel: fix permission mangling
The old code masked out write flags before returning permissions
from permissions() or data(FilePermissions) in order to force
QFileDialog to disable the rename and delete actions. This was to
fix Task 143519, but introduced QTBUG-20503.

Instead, revert to the pre-143519-bugfix code and do the necessary
check in QFileDialog directly.

Also add a testcase for 143519.

Reported-by: Gilles Pascual
Task-number: QTBUG-20503
Task-number: 143519

Change-Id: I140109341c0ed40722e3aac4327c2a740fb014c2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-09-26 04:03:41 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Sergio Ahumada
34cd8fd566 tests: Don't omit the body of a test function with QT_BUILD_INTERNAL
Changing it outside of the test function definition to avoid running
empty/inapplicable test functions.

Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
2012-09-14 06:24:38 +02:00
Thiago Macieira
672b5b7ab6 Set the Qt API level to compatibility mode in all tests.
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-01 15:37:46 +02:00
Friedemann Kleint
607c37befb Remove usage of deprecated qWaitForWindowShown in dialog tests.
Change-Id: Id3ebe202d65ee682e8e2e3ae107808e9abb6cc15
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 00:08:28 +02:00
Friedemann Kleint
6ae168f8ce Tests: Replace deprecated QPixmap::grabWidget() by QWidget::grab().
Change-Id: I5018cf5dd51c1781e7f17c7d205f3f60de7945be
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-20 16:47:11 +02:00
Friedemann Kleint
8761840397 Implement waitForWindowExposed and friends for widget windows.
- Implement waitForWindowExposed() for toplevel windows.
- Implement waitForWindowShown(QWidget *) and mark as
  deprecated in line with waitForWindowShown(QWindow*).
- Use in tests.
- Simplify tests (collapse waitForExposed, setActive
  into setActiveWindow, waitForActive), remove most
  hard-coded timeouts.
- Stabilize graphicsview tests by using waitForWindowActive.

Change-Id: Ic7c061e2745b36f71a715ee4e47c0346b11a91e8
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-20 09:27:28 +02:00
Friedemann Kleint
dcf12533b7 Remove the test tst_qdialog::throwInExec().
QtWidgets and QtGui are currently compiled without exceptions,
which causes a crash with gcc 4.6.3.

Change-Id: I8f872f3bec6266444adf08d51a6678150c5fae8e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-19 12:58:12 +02:00
Friedemann Kleint
a89c7e4020 Replace Q_WS_ in tests by Q_OS_ or check platform names.
Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 16:30:55 +02:00
Friedemann Kleint
2d5caa0b79 Tests: Fix printsupport profiles.
Fix reversed conditions, breakage introduced by
32db7de207.

Change-Id: I6fca399376cd1fa9bffea0a686b56c4d5ec26605
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-12 11:15:58 +02:00
Bjoern Breitmeyer
32db7de207 fixed unittest builds for wince
removed printsupport tests for wince as there
is no print support on wince and removed the special
handling for wince from 4.8 on some tests as the dependent
modules are not part of qt base anymore

Change-Id: I4ffb22da11f98beee1013f775cb5ce4b936d3211
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 21:14:09 +02:00
Shane Kearns
afdce18f57 QSKIP test that is blocking unrelated changes in CI
The test looks vulnerable to misbehaviour if the working directory
contains unexpected files and folders. As it's already skipped on
Mac, skip on linux as well to unblock the CI.

Change-Id: Id2e48ea455eb77e36c4f9d899885e101f674c0a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-25 23:32:50 +02:00
Rohan McGovern
f681e99e29 tst_qfilesystemmodel: increased test's permitted runtime
This test has recently timed out a few times on Windows test runs, with
no relevant changes to account for the timeout. Double the permitted
runtime.

Change-Id: I93765c9ea592973495bfe3a2f63e63ed615eb542
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-06-20 03:17:05 +02:00
Rohan McGovern
4e9e4d940f Make tst_qfiledialog2 closer to parallel-safe.
Use a QTemporaryDir instead of the system-wide temporary directory.

The test is still not entirely parallel-safe (at least on X11) due to
requiring the shown dialog to have keyboard focus.

Change-Id: I628dc6ab52dda49f6957a301eea8944bb9d81453
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-05-29 09:39:18 +02:00
Rohan McGovern
61904b8cfc Make tst_qfilesystemmodel parallel-safe.
Changed one testfunction to use the test's own QTemporaryDir instead of
the system-wide temporary directory.

Change-Id: I6740a7f4ba7f53174cd0730239d8dc088e5111ba
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-29 03:04:29 +02:00
Rohan McGovern
177070cb7b Add CONFIG+=parallel_test to suspected parallel-safe tests.
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows.  Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.

Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-28 07:33:01 +02:00
Carl Schumann
a70b8d407e Fix bug when destruction fields in QWizard
Maintain the consistency of QWizardPrivate's two members:
    QVector<QWizardField> fields;
    QMap<QString, int> fieldIndexMap;
during and after calls to QWizardPrivate's
void _q_handleFieldObjectDestroyed(QObject *)
member function.  The failure to maintain this consistency
caused an out of bounds access and core dump in
QWizard's field(const QString &name) member function.

QWizard's field(const QString &name) member function expects
the values in the QMap fieldIndexMap to be indexes into the
QVector fields.  Prior to this change
_q_handleFieldObjectDestroyed only removed the appropriate
entry from the map and erased it from the vector.  It did
not decrement by one all the indexes greater than the index
that was removed from the map and erased from the vector
in the rest of the map.

For example ...
So if initially have the following mapping ...
"field0" -> 0,
"field1" -> 1, and
"field2" -> 2
with fields of size 3. After destruction of "field1" have ...
"field0" -> 0, and
"field2" -> 2
with fields of size 2.
Now attempts to look up "field2" using QWizard::field will
have an out of bounds error and possibly core dump or trigger
an internal Qt assert because an attempt to access
this->fields[2] will be made.   It should be accessing
this->fields[1], but does not because the map is no longer
consistent with the vector.

This change adds a decrement by one for all the indexes
greater than the index that was removed from the map and
erased from the vector.

Task-number: QTBUG-25691
Change-Id: Ia2a41027628a65faec4ecdd5da235ddd19746a57
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-16 22:03:30 +02:00
Friedemann Kleint
b316c3ac5e Improve widget geometry.
- Rename posFromMove to posIncludesFrame in Widgets and
  make the handling more fine-grained; try to clean it up
  as soon as the frame margins are known
  in QWidgetPrivate::fixPosIncludesFrame().
- Implement QWidgetPrivate::updateFrameStrut().
- Windows: Handle posIncludesFrame in window creation,
  notify changed geometry after setting window flags.
- XCB: Do not change the window gravity in propagateSizeHint()
  as this causes the window to jump around. Determine
  the gravity in window creation, leave it constant and
  fix the geometry when setting instead.
- Store the normal geometry when maximize/fullscreen
  state change events are received.
- Remove xfails from fixed tests

Task-number: QTBUG-25331
Task-number: QTBUG-24905
Task-number: QTBUG-24294

Change-Id: I89c7229d86aaf88f02247d63915da7905e4a27ea
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-09 13:40:16 +02:00
Girish Ramakrishnan
36547f4eff Expose QPA API under qpa/*
The main reasons for doing this are:
1. _qpa.h end up in the master QtGui include file. QtGui is meant for
userland applications. qpa code is neither binary nor source compatible.
Inadvertant use of QPA api makes the user code binary-incompatible.
2. syncqt creates forwarding headers for non-private header files. This
gives people the impression that this is public API.

As discussed on the mailing list, even though QPA api is internal and subject
to change, it needs to  treated differently from private headers since they
will be used by  in-qtbase and out-of-qtbase plugins.

This commit does the following:
1. The _qpa in QPA header files is dropped.
2. syncqt now treats any file with qplatform prefix as a special file and
moves it to qpa/ directory. The recommended way of using QPA API in plugins
is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API
from multiple modules (for example, qplatformfoo might be in QtPrintSupport)
3. The user needs to explicitly add QT += <module>-private to get access to
the qpa api.
4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo
includes.

This commit does not change the cpp filenames. This requires a more careful
merging of existing non qpa cpp files and existing cpp files on a case by
case basis. This can be done at anytime.

The following files are not renamed as part of this changed but will be fixed
as part of a future change:
src/gui/kernel/qgenericpluginfactory_qpa.h
src/gui/kernel/qgenericplugin_qpa.h
src/gui/kernel/qwindowsysteminterface_qpa.h

files were renamed using

    for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done
    for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done

includes were renamed using script

for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do
    sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \
        -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \
        -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \
        $file
done

Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-05-07 20:25:24 +02:00
Thiago Macieira
1eac22a1b9 Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-03 06:10:20 +02:00
Debao Zhang
ade8888603 Don't use obsolete qVariantValue, qVariantCanConvert, etc.
qVariantValue and qVariantCanConvert are Compatibility members, while in
Qt4.8 they are marked as Qt 3 Support Members.

qVariantFromValue and qVariantSetValue are Obsolete members.

Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-02 08:30:59 +02:00
Christoph Schleifenbaum
1c9a4093a5 Respect the DontUseNativeDialog flag.
QFontDialog and QColorDialog were ignoring the DontUseNativeDialog. This
lead to a native (Cocoa) dialog created all the time.

Fix the testcase for QFontDialog. It needs the DontUseNativeDialog flag
set.

Task-number: QTBUG-24321

Change-Id: I159c1ad057bac38226f1e01a56b15f142650bfd8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-27 05:51:14 +02:00
Bradley T. Hughes
fcf0e67deb Skip tst_QInputDialog on Mac OS X
This test hangs in CI, but so far I've been unable to reproduce the
problem. Disable the test for now so that this test does not block
changes that bring in needed functionality.

Task-number: QTBUG-25496
Change-Id: I81faa574b6d7bcab2e32becc2af0f71006c7dd9c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-25 14:58:36 +02:00
Lars Knoll
64255ef650 Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
2012-04-17 12:58:52 +02:00
Friedemann Kleint
7e0beba891 Skip tests toolbar-dialog/widget_window.
To enable merging the api_changes branch.

Task-number: QTBUG-25331
Change-Id: I90d32ca0bd96eed62bae5f01316d6360a3b435c8
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-04-17 10:38:28 +02:00
Bradley T. Hughes
5a57ddebf5 Fix tst_QDialog::deleteInExec() crash on Mac OS X
When destroying a window immediately after showing it, we can sometimes
provoke a crash in Cocoa after the show-window-animation has finished
(which appears to assume that the window's view will always be valid).
Prevent the crash by not removing the view from the window. When
recreating a window, we explicitly release the old window, but we do not
release the view, so we can freely add it to the new window (i.e. this
does not introduce new bugs related to recreating the platform window).

Task-number: QTBUG-24977
Change-Id: I466ce75b04785401032a0a2d4a2c494910cd1672
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-17 03:28:29 +02:00
Robin Burchell
7be255156f Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.
Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.

On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.

For qMemCopy, the benefits are a little more modest: 16-7%.

Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 10:46:19 +02:00