Commit Graph

2677 Commits

Author SHA1 Message Date
Simon Hausmann
ce1f994e9b Fix QScreen::orientation() not always being updated after changing the update orientation mask
The back-end might report screen orientation changes at any point and we
record it in screen.d->orientation. However QScreen::orientation()
returns the orientation filtered according to the mask.

Changing the mask sends a notification to the back-end, which might send
another update as a result of a possible subscription to system services
(accelerometer). However on platforms where no subscription is required, where
the platform plugin ignores the mask and always sends the latest orientation,
we should "simulate" the update by updating the filtered orientation according
to the new mask. The function is cheap to call as it won't emit any signals
unless the orientation actually changes.

This patch also adds missing flush() calls after handleScreenOrientationChange
calls in the tests to ensure that the (synthetic) window system events are
actually delivered to QScreen/QGuiApplication.

Change-Id: Iebdd050f947e658ff5bc388629aa4cb31ab497fe
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
2012-09-26 19:55:00 +02:00
Simon Hausmann
c4e736cf9d Fix events being processed on application start
Commit ef2efafcc6 introduced a call to
QWindowSystemInterface::sendWindowSystemEvents() in
QGuiApplicationPrivate::init(), which in its implementation ends up calling
sendPostedEvents() before flushing and processing any pending (internal) window
system events.

This patch changes the call in init() to use
QWindowSystemInterface::flushWindowSystemEvents() instead, which is more gentle
in that regard.

The provided unit test verifies that no posted events are processed during the
execution of the QGuiApplication constructor while at the same time verifying
what the original changed tried to do: Allow a generic plugin to provide window
system specific defaults that are implemented using the event queue of
QWindowSystemInterface.

Task-number: QTBUG-26886

Change-Id: I129a907c00d947df60fe1a02efc67857580fce24
Reviewed-by: David Faure <faure@kde.org>
2012-09-26 19:54:19 +02:00
Marc Mutz
aec5b76b51 [QTBUG-27308][QTBUG-21534] Don't mouse-wheel-scroll QScrollBar when disabled
This fixes a regression introduced in Qt 4 commit
e855b199319c932f2e9500235775f961bc32e41a.

The problem was that by handling the wheel event in event()
instead of wheelEvent(), we lack the guard clause in QWidget
that doesn't even call the handler if the widget is disabled,
and the code didn't handle this itself.

Fix by reimplementing wheelEvent() instead, which we can now
do because we can break BC.

This commit just moves the code. Another commit will clean
up the implementation of wheelEvent().

Task-number: QTBUG-27308
Reported-by: chenjiexin
Task-number: QTBUG-21534
Reported-by: Martin Koller
Change-Id: Ibe6b89a81fe889f839c205b859a1492b39a4ddc3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-26 19:06:47 +02:00
Teemu Katajisto
0b2068eafd QtPrintSupport: allow slight deviations from pre-defined paper sizes in tests
CUPS paper sizes may differ from Qt paper sizes slightly and thus fail
the strict comparison in qprinter tests. This is needed for the
followup patch which initializes the cupsplugin with CUPS/PPD defaults.

Change-Id: Ie66f77ead0204de0fc7c7913005fa516d57d34eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-26 10:08:59 +02:00
J-P Nurmi
54d18cdc29 Auto tests: remove PlatformQuirks::isAutoMaximizing()
Use QStyleHints::showIsFullScreen() where necessary.
Notice that QWidget::show() already calls showFullScreen()
if appropriate, and Qt::X11BypassWindowManagerHint doesn't
do anything in the XCB platform plugin.

Change-Id: Ib8f61188c075170d646894388561cbb3f72daee8
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-09-26 10:08:59 +02:00
Kai Koehne
f052ee467d Fix MinGW/gcc warning about NOMINMAX being redefined
Commit 5230d62fe added a #define NOMINMAX, which conflicts with a
NOMINMAX definition in the MinGW headers. Just use the same definition
as in MinGW to fix the gcc warning.

Change-Id: Ib21dd323ebbdca5d143e394c7631303e0c72541a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-26 10:08:59 +02:00
Caroline Chao
371c21b9a8 Test: tst_QFile::writeLargeDataBlock() unstable failure as XFAIL
While the large data block can be written to a file, the test is
also showing instability while reading back the written block.

Adding another expected failure to address this instability.

Task-number: QTBUG-26906

Change-Id: I9704d441cf2bd6d7ef0f9023240ea61bb89561b6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-09-26 10:08:59 +02:00
Jonas M. Gastal
4920090da0 If accept fails, stop accepting new connections and emit error signal.
Task-number: QTBUG-24778
Change-Id: I6c5b685b3f861a0fafc1475c41bb35cede17d712
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-26 04:03:51 +02:00
Janne Anttila
bf05abddfd Fix qstringlist autotest build for WinCE.
WinCE does not have setlocale, used SetUserDefaultLCID correspondingly
as it is done in qstring autotest for WEC7.

Change-Id: I7866bf0f365c7c6efbf3b439cdd9a281c6a1b2e0
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-09-26 04:03:48 +02:00
Sergey Hambardzumyan
931640391a test:Remove QSKIP from tst_QPainter
Removed QSKIP ("currently broken... ") from tst_qpainter.cpp.

Change-Id: I2a5af009198d26015779ca368ef82188ddf1b060
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-26 04:03:41 +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
Mitch Curtis
6b6fefad48 Remove duplicate words and punctuation from documentation.
Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-09-26 04:03:20 +02:00
Konstantin Ritt
a798b956b9 QCharAttributes: add wordStart/wordEnd flags
A simple heuristic is used to detect the word beginning and ending by
looking at the word break property value of surrounding characters.
This behaves better than the white-spaces based implementation used before
and makes it possible to tailor the default algorithm for complex scripts.

BIG FAT WARNING: The QCharAttributes buffer now has to have a length
                 of string length + 1 for the flags at end of text.

Task-Id: QTBUG-6498

Change-Id: I5589b191ffde6a50d2af0c14a00430d3852c67b4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-09-26 03:09:57 +02:00
Sergio Ahumada
aeb21c73c5 test: Mark tst_QMdiSubWindow failures as XFAIL
The test has lots of failures, so mark these with QEXPECT_FAIL and
remove the QSKIP.

Task-number: QTBUG-22310
Task-number: QTBUG-27274
Change-Id: I0d38cedb581741b6edae5d1c3f4410714099a7fb
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-09-25 20:28:06 +02:00
Caroline Chao
e14099cfbc Test: Remove QSKIP from tst_QWidget::raise
Remove QSKIP("Not yet sure why this fails."), the test is passing
on Mac.

Task-number: QTBUG-22321

Change-Id: I5f09d067b1cc837c5e3ada5bbd34091fe1fd723d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-09-25 18:36:32 +02:00
Caroline Chao
9f98fe04c1 Test: tst_QFile::writeLargeDataBlock() unstable failure as XFAIL
The current check is not enough to catch the unstable failure.
Update the test to catch the failure in all cases.

Task-number: QTBUG-26906

Change-Id: I2e37a1f6513df768cd410df7c91a9fd843150e57
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-25 18:36:09 +02:00
Caroline Chao
01a985ac5b Test: Remove QSKIP from tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut
The test is passing on Ubuntu 11.10.

Adding qWaitForWindowExposed after the line edit show() call to ensure
the line edit is actually shown on the screen.

Task-number: QTBUG-24518
Change-Id: I2af65bef76d171b36032120738dfbd7cfff51d7f
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-25 18:36:01 +02:00
João Abecasis
0c2b7b1020 Fix default-constructed QFileSystemEntry
Member variables for lastSeparator, first and lastDotInFileName are now
initialized to -1 (non-existing), where the previous value of zero would
mean a separator/dot at that position and resulted in path() returning
'/', instead of '.'.

Tests were expanded for better coverage of empty state and
default-constructed instances.

Change-Id: Ie27547886b52224d38b5be0b4f920c9927fd440f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-09-25 00:08:16 +02:00
Lars Knoll
6ddef0007a Test case for moc handling defines
Added some test cases that check that moc
correctly expands #defines

Change-Id: I7fe6eed129d46ca9281d73064571cae43b32410d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-25 00:08:16 +02:00
Mark Brand
7389c09637 QSqlTableModel::selectRow(): fix failure on uncached rows
This method was originally intended for refreshing rows after
submitting changes. It should also work for refreshing rows
that are unchanged (i.e., not cached), but did not because
constructing the primary values depended on the cache. As a
consequence, the WHERE clause for the query was not created.

Fixed by deriving primary values for uncached rows from the
query record. Note that the cache is still authoritative for rows
it holds. This is important because the prmary values there may
differ from the original query record due to changes to columns
of the primary key.

Includes new test.

Change-Id: I41cca2cbf26019d4b495ffa6d876e2b55ec57803
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-09-24 21:27:51 +02:00
Caroline Chao
99f2bdd28f Test: Enabled tst_QFile::invalidFile
The test is not hanging on Windows anymore.

On Windows, add an expected failure for the failing case.

Task-number: QTBUG-22801
Task-number: QTBUG-27306

Change-Id: Iede95766504f3e8a278a4554a5967ca333aae3bf
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-24 21:27:51 +02:00
Thiago Macieira
3827fd2a37 Add some tests for compatible and incompatible custom deleters
Change-Id: I2bb7f597aab0f00a250881602e6a6bb7bfe42e18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-24 21:27:51 +02:00
Stephen Kelly
05aa8c6c12 Implement viewOptions() logic in QListViewPrivate.
The private method is called in several places in QListViewPrivate,
but before this patch, the implementation in QAbstractItemView was
 called. This meant that the options were not set properly,
resulting, for example, in icons in icon mode being laid out in
list mode (on the left and small).

This is a regression resulting from
8eab9cbce2 and
3578e05b29. Other views are not
affected in a similar way.

Change-Id: I753cb99410e367266753eaf2fa43361b9212ab96
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-24 18:01:07 +02:00
Jędrzej Nowacki
c06106f28d Fix potential breakage in QString.
Negation operator ("!") have precedence over bitwise and ("&").

Change-Id: I39e2d99da6eaa4477bbe35a1259f745e05c9841a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-24 16:53:13 +02:00
Marc Mutz
c00bd8d677 Use QStringList::join(QChar) overload where applicable [QtCore]
This is an automated change performing the following replacements:
                    join\("(.)"\) -> join('\1')
  join\(QLatin1String\("(.)"\)\)  -> join(QLatin1Char('\1'))
  join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1'))

Change-Id: I81c378ef6aeeada5e116f1394cc9fc67f901ffd6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-23 23:30:18 +02:00
Sergio Ahumada
1395b81935 test: Remove QSKIP from tst_QFocusEvent::checkReason_ActiveWindow()
This test actually passes using the "xcb" platform and fails otherwise.

Second, the Jira task is misleading since it refers to
tst_QFocusEvent::checkReason_Shortcut()

Change-Id: Icab91ace8c214d958b534c5cebae900242522372
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-09-22 23:40:02 +02:00
Friedemann Kleint
f6155aec30 Redirect keyboard/mouse grab to the widget parent window.
Use the native parent's window if the widget in question does not
have one. This should be in line with Qt 4.8 using effectiveWinId().

Remove redundant code in grabMouse(QCursor).

Change-Id: Id6ab192e739221fe89f865f4d2f7a6d4671a190b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-22 20:46:30 +02:00
Marc Mutz
15953e9503 QModelIndex: clean up integer size confusion in the API
QAIM::createIndex() took either int or quint32, but QMI::internalId()
returned qint64.

In the new interface, createIndex() takes, and internalId() provides,
integers of type quintptr.

This matches the storage size of the void* in the model index and
avoids truncation.

Remove the
  createIndex(int, int, quint32) and
  \obsolete createIndex(int,int,int)
overloads.

This makes a literal 0 in the third parameter ambiguous now.
The solutions have been noted in changes-5.0.0.

Change-Id: I0a0ecd8430eaf695129a4d09d14d4e30745485c4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-22 20:45:12 +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
Konstantin Ritt
ceb9a8232c A step out from Harfbuzz (reduce dependency)
Introduce QCharAttributes and use it instead of HB_CharAttributes everywhere in Qt
(in Harfbuzz, the HB_CharAttributes is only used in the text segmentation algorithm
which has been moved from HB to Qt (well, most of it)).
Rename some members to better reflect their meaning,
remember to keep HB_CharAttributes in sync with QCharAttributes.
Also replace HB_ScriptItem with a (temporary) QUnicodeTools::ScriptItem struct
that will be replaced with a more efficient/friendly solution a bit later.

The soft hyphen and the mandatory break detection has been factored out
of the default text breaking algorithm to a higher level in order to refactor
the QCharAttributes bitfields and to optimize the implementation for the common case.

Change-Id: Ieb365623ae954430f1c8b2dfcd65c82973143eec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-22 00:47:40 +02:00
Caroline Chao
e3d334e7c3 Test: Update QSKIP message of tst_QVector::outOfMemory
This test is crashing. Specify the bug report number in the QSKIP
message.

Task-number: QTBUG-22343
Task-number: QTBUG-27285

Change-Id: I4d4ead4f54944a545103a3d01c5c9d302d7fb1df
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 00:47:40 +02:00
Caroline Chao
e7dccd9e03 Test: fix warning for tst_QPluginLoader::loadGarbage
Garbage libs (under elftest) are numbered from 1 to 5 and not from 0 to 4.

Change-Id: Ia0162372bf5cd1fb53a0442543c5a65716880611
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 00:47:40 +02:00
Samuel Rødal
ed8dec360c Fixed multiple modal windows from all blocking each other.
A modal window in front in the modal window list should never be blocked
by a modal window further back in the list. This was taken care of in
QGuiApplicationPrivate::isWindowBlocked(), we just need to make sure it
gets called when a new modal window gets shown so that its blocked
status is up to date.

Task-number: QTBUG-27206
Change-Id: I590f1715e66067edb178081352636f34fe54a885
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2012-09-21 22:04:00 +02:00
Jens Bache-Wiig
fe966e5f48 Fix regression in QAbstractScrollArea
The style hint SH_ScrollView_FrameOnlyAroundContents was currently
being ignored by QAbstractScrollArea. This looks like an accidental
regression following 10c6f015f4.

This code path does not execute on mac so it should have no impact
on that patch.

Change-Id: I78ca0a6b87dfdd7d426acbb3ef49480390211af2
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-21 02:44:22 +02:00
Samuel Rødal
72aaba336c Fixed inconsistent rounding of square cap pens.
A horizontal line should round up at the same time as a vertical line
with square cap, when rendering at subpixel coordinates. Thus, the
special casing in the cosmetic stroker of offsetting by half a pixel
should be for flat caps instead of for square caps.

Task-number: QTBUG-26013
Change-Id: Ic09249337f814c7de95a17976ec9e651561a744b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-20 23:08:44 +02:00
Oswald Buddenhagen
33e0d5c939 remove mentions of borland from project files
Change-Id: I3049b24ae287bee50aca1de06664a2309df69edf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Mitch Curtis
63bc298fb3 Pass correct argument to QShortcutEvent ctor in tst_qabstractbutton.cpp
The QShortcutEvent constructor takes "int shortcutId" as its second
argument, not a bool. Since the default shortcutId is 0, this test
passed, since false == 0.

Change-Id: I43bbae4613f3badb1578dccec76dcdd3c96a3a2f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-19 19:54:44 +02:00
Miikka Heikkinen
ede4f5e23b Fix mapping to/from global coordinates for child/embedded windows.
QWidget's mapToGlobal() and mapFromGlobal() functions assumed that
if the widget reports it's a window or if it has no parent widget, it
must be a top level window whose coordinates are in global coordinates.
This is not true for child QWindows or embedded native windows
(QAxWidgets).

Changed the logic for mapping coordinates to use equivalent methods
from QWindow if widget has a window handle, and changed QWindow's
methods to map coordinates using native methods if window is embedded.

Also fixed newly failing accessibility autotest. The geometry related
failures there popped up because now the position of the rect returned
by accessible interface is actually correct while widget geometry still
reports position 0,0 before widget has shown up.

Task-number: QTBUG-26436
Change-Id: I658fafd0ce01eb1604ba255efeeba3073ca0189f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-18 14:52:38 +02:00
Richard Moore
5ea896fbc6 Disable SSL compression by default.
Disable SSL compression by default since this appears to be the a likely
cause of the currently hyped CRIME attack.

Change-Id: I515fcc46f5199acf938e9e880a4345f2d405b2a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2012-09-18 14:12:17 +02:00
Tomasz Duda
60f4fc8b70 HTTP header may be damaged - fix, unit test
"HTTP/1.1 100 CONTINUE\r\n"
If the header from a server is splitted between two packets
the first packet contains "HTTP/1.1 100" and the second one
contains " CONTINUE\r\n", one space (0x20) is skipped. After
processing the line looks in this way "HTTP/1.1 100CONTINUE".
QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
is called twice, if a http header is splitted as above.
The function always removes whitespace from the beginning of a packet,
even if it is the second part of a http header.

QHttpNetworkReply returns QNetworkReply::RemoteHostClosedError
due to damaged http header during processing.

Improvement of unit test.

Task-number: QTBUG-27161

Change-Id: Ifc2949f62473209b4032185effbf5078b4130cda
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-09-18 00:59:08 +02:00
Sergio Ahumada
f0b922a3af test: Mark tst_QTabBar::sizeHints() failure as XFAIL
The test has one stable failure on Mac OS X, so mark this
with QEXPECT_FAIL and remove the QSKIP

Task-number: QTBUG-22320
Task-number: QTBUG-27230
Change-Id: I7660df5770c39788792068a5b68e8236551288c4
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
2012-09-17 09:14:05 +02:00
J-P Nurmi
7329ad3ee5 Attempt to stabilize QMenu auto tests
Change-Id: I7d8260570a280182990d78e07d696aa4b46e1747
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-09-15 19:35:25 +02:00
Rafael Roquetto
31f94e0285 Blackberry: fix tst_QFileInfo::fileTimes()
The Blackberry OS uses a filesystem with the noatime option,
which returns a "wrong" access time.

Change-Id: I04cdb899699e819a36e0917e30d750067b33388d
Reviewed-by: Tobias Koenig
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-09-14 19:07:15 +02:00
Kai Koehne
1dd4790aee Autotests: Use qInstallMessageHandler
qInstallMsgHandler got deprecated in Qt 5.

Change-Id: Ib36983e66b3a8090b99f14e3fd4e210602a3f018
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-14 15:23:15 +02:00
Pekka Vuorela
5f974a4faf Avoid deprecated QTest method in unit test
Change-Id: I1d6fc84962ba29a8963f99b87cccb4af465a2935
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-09-14 11:18:17 +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
Jan Arne Petersen
a386194f99 Fix QDBusServer with more than one connection
Create a new QDBusConnectionPrivate for every new connection in
qDBusNewConnection instead of creating a single QDBusConnectionPrivate
in the QDBusServer constructor which gets assigned the latest connected
DBusConnection in qDBusNewConnection (and loses track on all previous
DBusConnections).

Also extend tst_QDBusConnection::registerObjectPeer() test with multiple
connections to the server.

Task-Number: 24921
Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-14 01:02:06 +02:00
Thiago Macieira
81b00670f2 Use QElapsedTimer instead of QTime to measure elapsed time
QElaspedTimer is a lot more efficient.

Change-Id: I66d9514108f800a45181d8960b01a5e7d3fa9e80
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-13 22:40:34 +02:00
Thiago Macieira
53a7778b90 Increase the fuzziness of the QSemaphore test to 50 ms
The test tries to acquire a semaphore that isn't ready, so it will
timeout. The test is working properly.

The only problem is that 10 ms is too strict. For a wide variety of
reasons, especially since the Qt CI system runs multiple tests in
parallel, the program may not run again in that 10 ms window.

Change-Id: Ic0f684895f73646db5f1cc783fe9ef75fb1ab02b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-13 22:40:27 +02:00
Markku Heikkila
d1d4647b74 Fixed: QFileInfo::lastModified() returning wrong value.
Fixed so that empty QDateTime is returned for non existing file.
Fixed also created() and lastRead() to return empty QDateTime for
non existing file.

QFileSystemEngine::fillMetaData() returned true for non existing
files. This was also corrected.

Task-number: QTBUG-25811

Change-Id: I523eb99e4405b4b813b2950f85cc646239181d07
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Christian Stromme <christian.stromme@nokia.com>
2012-09-13 19:33:08 +02:00