Commit Graph

2322 Commits

Author SHA1 Message Date
Jiewen Wang
7381328bcc QStatusBar::showMessage will always take new timeout
There is a message check in QStatusBar::showMessage causing the call exits
early if the new 'message' is the same
as the current message. The check has been removed, and new timeout will
always take effect. Unit test is added as well.

Change-Id: I3a03c6842835824caba4adc37c3ed834952c4bb2
Task-Id: QTBUG-25492
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-25 21:41:42 +02:00
Tarja Sundqvist
7266e11297 QTBUG-16850: QLineEdit::setSelection removes blank characters
Changed checking of the start position so that it does not call d->control->text() because this removes blank characters when an input mask is used. Thus the
selection fails. Instead d->control->end() is used for checking the start position.

Task-number: QTBUG-16850
Change-Id: I62992fb81bd47d432bade9f219782d48eb309956
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-05-25 17:23:20 +02:00
John Layt
3dffbe8c81 QtPrinterInfo: Improve QPrinterInfo Testing
Much of the current QPrinterInfo tests fail due to being dependent on
specific physical or network printers being attached.  This change
removes all printer specific tests and replaces them with generic
tests that will use whatever printers are installed.

Note if no printers are installed then the tests will still pass. A
later change will add virtual printers to test returned results are
correct.

Windows test code is also required and will come later.

This does not yet remove the "insignificant" status from the test,
further improvements and code fixes are still required.

Change-Id: I60802445924edb126aadf78337a8cb6f2f3b3d37
Reviewed-by: John Layt <jlayt@kde.org>
2012-05-25 13:23:14 +02:00
Mitch Curtis
794febd713 Write QList unit tests for movable, complex, etc. types.
Change-Id: I641ada39f7c84cd221ec1e235cdb0c86270d49fc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-24 20:20:52 +02:00
John Layt
36f469bdb1 QtPrintSupport - Modify Platform Plugin QPrinterInfo api
Change the way the printsupport plugin creates QPrinterInfo
objects, provide platform api to return a named printer, and
expose this as static public api in QPrinterInfo.

Only the Mac plugin used the old api, the other plugins will
have direct support added in separate commits, but will use
the default implementation for now.

Change-Id: I7d6b6556eb39919cfb15bc0e814afbaf13c5712c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-24 09:48:27 +02:00
Rohan McGovern
0a298ab485 tst_qmetatype: avoid slow compilation with some MSVC2010
MSVC2010 32-bit (with and without service pack 1) takes about 1 hour to
compile this file in some builds, since
1c7421ad14.

Avoid the relevant portion of the code just for these compilers.

Change-Id: Icbb4fa12a6d563a7cdc882c30cdb5705675bedb0
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-24 07:14:40 +02:00
John Layt
f3ad57e90e QtPrintSupport - Fix Mac printerName() use
Mac in Qt4 and 5 has been using the PMPrinter Name for the QPrinter
and QPrinterInfo printerName() value, but this is incorrect. This
is in fact the CUPS Description field, is in human readable form
and is not guaranteed to be unique. The CUPS Name field is the
PMPrinter ID value and should be used as the unique identifier
when accessing printers. This has worked up to now due to an
undocumented feature in the OSX api that accepted the Name when
the ID should be used.

Changing all uses of PMPrinterGetName to PMPrinterGetID fixes this
and allows the QPrinterInfo test of names to pass without
munging the names.

Change-Id: I25322aa1a924bed9f67f4ad5e208274c8b700e17
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-05-23 23:55:43 +02:00
Laszlo Agocs
cd8ff4fa8f Fix wrong local positions in mouse events when no tlw was given
Calling handleMouseEvent() with w == 0 implies that the local position
is bogus and instead it should be calculated from the global position
once the target window is known.

Change-Id: If173d0570f6dcc8b7bc5d6f21fa1f69d06d9d702
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-05-23 19:22:34 +02:00
Shane Kearns
f604fd8ff4 QAuthenticator - test NTLM SSO and normal paths separately
Single signon code path gets the NTLM responses from the system,
so we can't predict the contents.

Task-number: QTBUG-25851
Change-Id: Ia8aa1741ae5af9e48643331bf9a3768550a30166
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-23 14:18:34 +02:00
David Faure
f06b629bfb Fix handling of invalid urls in QDataStream << QUrl
When given an invalid url, the output shouldn't be a valid url.

KDE's kurltest detected this regression compared to Qt4, where
all invalid urls were empty in toString() -- but we don't want that,
to give as much feedback as possible to the user.

Change-Id: Ie53e6e1c0a1d4bb9e12b820220dfb7e2f7753959
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-23 14:18:34 +02:00
Jędrzej Nowacki
06906ce40d Fix warning about unused variable in tst_qvariant.
Change-Id: I9e713aa6a2033c5c4cd4b97bbd4ebb461d46962a
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-23 14:18:34 +02:00
Rohan McGovern
03536d3e3d Removed CONFIG+=parallel_test from suspected parallel-unsafe tests [2]
These tests have failed a parallel stress test and may contribute to
instability in test runs.

Change-Id: Ibbbe01f7d9550b953fc9fbd6ed52fc99fdb5f5d7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-05-23 03:17:59 +02:00
Tasuku Suzuki
8b78b3a620 Fixed QLineEdit::inputMethodQuery() for Qt::ImHints
It should return QWidget::inputMethodHints() instead of QVariant()

Change-Id: I01f5de8f2087ac67d125f54f08abed523653eb92
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-05-23 01:11:27 +02:00
Anselmo L. S. Melo
5645f3253f Fix auto tests build with gcc 4.7
Added #include <unistd.h> to tests/auto/network-settings.h,
so qtbase auto tests successfully build.
It is needed after the header dependency changes, part of gcc 4.7.

Change-Id: I76d1082f8454263f2c22c31a13aa3c1bf6a0c82f
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-23 00:42:20 +02:00
Jan-Arve Saether
018cb899d4 Replace (un)checkAction with toggleAction (3/3)
Remove all references to (un)checkAction.
This commit finalizes the intended change.

Change-Id: I79d3b30b5c3d9fbe276c2c94fed5971bb21d6c02
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-05-22 20:56:38 +02:00
Konstantin Ritt
25f40b2de2 replace remaining "const QChar &" with "QChar"
QChar is actually a ushort and passing it via const-ref is suboptimal

Change-Id: Ib806b90397de6a816142ed130a22c0fe10a85d79
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-22 20:56:38 +02:00
Thiago Macieira
1ca791faf5 Add the QUrl::FullyDecoded flag to the component formatting
This allows the QUrl component getters to return fully decoded data,
like they did in Qt 4. This is necessary for some use-cases where the
component like the user name, password or path are used outside the
context of a URL. In those contexts, the percent-encoded data makes no
sense, and the loss of data of what could be represented in a URL is
acceptable.

Also take the opportunity to expand the documentation of those getter
methods, explaining what the options argument does.

Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003811.html
Change-Id: I89f743cde78c02f169c88314bff0768714341419
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-22 20:56:38 +02:00
Thiago Macieira
53d0624403 Add QUrl::ParsingMode to the component setters in QUrl
This allows one to instruct QUrl to ignore the percent-encodings and
interpret the data exactly as provided. This is useful in certain
use-cases where the data comes from a non-URL context.

The strict-mode checking of the components is not implemented
yet. Currently, the behaviour is equal to that of TolerantMode.

Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003811.html
Change-Id: Ia5abe045a8ce7f9b50cbce3b5a7e3735e068d03a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-22 20:56:38 +02:00
Thiago Macieira
f0ec001242 Port away from QUrl::MostDecoded
Since we're about to introduce QUrl::FullyDecoded, this
QUrl::MostDecoded value would be confusing. Replace its uses with what
was intended at the point in question.

Change-Id: Iefd87bc33d37bace507c5cb0f206fa902e08e2df
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-22 20:56:38 +02:00
Thiago Macieira
4793356ce7 Fix the idempotent recoding tests in tst_QUrlInternal
This was trying all the possibilities by brute force, but it turns out
that some combinations are not valid so they should not be
tested. What's more, it was using old values of the flags, so this was
actually testing nothing.

Change-Id: I6c2f5230d240fc23418df2d3a1ca905dbc47dd10
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-22 20:56:38 +02:00
Mitch Curtis
083af3c319 Fixed unused function warning in qsslcertificate test.
Change-Id: I4d402e486a8ceb965d008056f5f1bcb227f6f40c
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-22 10:27:40 +02:00
Rohan McGovern
360797208b Removed CONFIG+=parallel_test from suspected parallel-unsafe tests
These tests have failed a parallel stress test and may contribute to
instability in test runs.

Change-Id: I2c4456ad7d3846c2262a0ba714ab8f0c9a05c597
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-22 05:09:01 +02:00
Mitch Curtis
3042267a93 Fixed unused function warning in qsslkey test.
Change-Id: I5039e011f3c9b44ed1887424f11e4e146c3eb07f
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-21 16:02:06 +02:00
Friedemann Kleint
061968d082 QWindowsBackingStore: Implement scroll.
Similar to XCB.

Task-number: QTBUG-24299
Task-number: QTBUG-24296 (partially fixed)

Change-Id: I4c9d813d9645f957f2caad0c4e395ce0d3d222cc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-21 16:02:06 +02:00
Jonas M. Gastal
2c790b251d Fallback to IPv4 when IPv6 is not present.
In tests when IPv6 is not present QSKIP IPv6 tests.
Task-number: QTBUG-23660
Change-Id: I02abc7322d765a93cbf661e53c76257f03dca73e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-21 13:00:27 +02:00
Richard Moore
0b8021f5cb Change QSslCertificate::toText() to return a QString.
A couple of people reviewing the toText() method (which is new in 5.0)
have said that since the string returned is human readable it should
be a QString not a QByteArray. This change follows their advice.

Change-Id: Ibade9a24870805f7fbe2d299abeb9c6e964f0cf4
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-21 03:10:43 +02:00
James Turner
b8246f08e4 Cocoa implementation of QPA menu interface.
Implement the QPA platform menu interface for Cocoa,
including native menubar support and merging with the
predefined menus created from the bundled .nib. Cleanup
code previously used to maintain the menus, and add
a manual test of the menus code.

Change-Id: Ia99267ddb6485e18e05c540eb32c5aee6cbb85db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-05-19 10:18:21 +02:00
Giuseppe D'Angelo
281771ee20 QRegExp: fix usage of uninitialized values
A (probable) typo was causing the code dealing with anchors
to use uninitialized values. This used to work by chance, but was
indeed detected by Valgrind f.i. when running tst_qregexp --
the indexIn test on anc11 data reported:

    ==3015== Conditional jump or move depends on uninitialised value(s)
    ==3015==    at 0x514B4EA: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1813)
    [...]
    ==3015==  Uninitialised value was created by a stack allocation
    ==3015==    at 0x514B3EB: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1803)

Fixing the code also makes the aforementioned test to succeed.

Change-Id: If7b3e518c1bbfcf12573d2637c33ef2eca27c4d5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-19 01:45:04 +02:00
Lars Knoll
7968543bb0 Don't use the deprecated translate() method anymore
The Encoding argument of QCoreApplication::translate()
is deprecated and source code is always assumed to be
encoded in Utf8. Simply remove the encoding argument
from the generated .ui.h files.

Change-Id: If6c40f6df13abd45a0303c863077972c3d1fb685
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-18 22:38:55 +02:00
Olivier Goffart
8df298665a Move QIcon metatype handlers back to QtGui
QIcon has been moved back from QWidget to QtGui, so the QIcon QVariant
and QMetaType handler can now be moved back to QtGui.
Also we can give back QIcon its old number, allowing to get rid of some
compatibility hack when unstreaming QVariant

Change-Id: I439d5c2987c06ecd619f394407850f678164afb8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-18 21:42:58 +02:00
Olivier Goffart
6c06e14a49 QIcon: move back to QtGui
-  Move the files and tests
git mv src/widgets/kernel/qicon* qrc/gui/image/
git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/

 - update the include of QIcon
git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon"
git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon"

 - Adapt QIcon \ingroup documentation
sed -i s/QtWidgets/QtGui/ src/gui/images/qicon*

 - Adapt export macro
sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon*

 - Update .pri and .pro files

 - Remove the use of QStyle::alignedRect by copying its content (and
   adapt slightly

 - Use QGuiApplication::palette() instead of QApplication::palette()

 - Add a hook in QGuiApplicationPrivate to call the
   QStyle::generatedIconPixmap() from QtWidgets

Another commit follows to adjust QMetaType::Icon and move the QVariant
and QMetaType icon handler back in QtGui

Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-18 21:42:38 +02:00
Stephen Kelly
1c7421ad14 Add test of automated container metatype declaration.
Change-Id: Iddaf444ead6d9f0147b9b11452ccea46aa712ba3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-18 15:22:22 +02:00
Toby Tomkins
91fda8f119 Remove parallel flag for qsemaphore because of flaky nature.
The CI system is now using the parallel_test flag to run tests in
parallel. This test has become flaky, or at least more flaky than it
was previously. Mark it to no longer run in parallel.

Change-Id: I47bca3be620a8f648a0eb9c9b9f26d2d925efc01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-18 10:33:17 +02:00
Andrew den Exter
d07982b104 Fix cursorToX for right to left text with trailing whitespace.
QTextLine::cursorToX returned the line width for cursor positions
outside the width of a wrapped right to left line because the
leading space width was always calculated as 0.

Returning a non-zero width for the leading space does cause
problems for other uses of QTextEngine::alignLine() though
as the textAdvance already doesn't include the leading/trailing
space so subtracting it there double accounts for it.

Task-number: QTBUG-24801

Change-Id: I56cbb139814c32813bebb49de8c045b29154a958
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-05-17 04:47:32 +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
Konstantin Ritt
279562172d enable the text layout's cache where it is seems to be missed
e.g. in QStaticText, the data is used just to get the line's y-position
and re-calculates just after the loop to determine the bounding rect and to draw the text;

in QWidgetLineControl, the data re-calculated over and over while the result
is seems to remain the same; probably the caching is needed here too

Change-Id: I0f7eb291532f63eccb9c5f749daebb73ff90632f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-05-16 19:38:01 +02:00
David Faure
348c3966a0 Add header qtest_widgets.h, similar to qtest_gui.h, but for QApplication.
The current alternative is to define QT_WIDGETS_LIB before including
qtest.h, but this is not convenient/intuitive when using other build
systems than qmake. If one forgets the define, crashes happen when
using QApplication-related code.

Use <QTestWidgets> in one of the widgets autotests, for testing.

Change-Id: Id96be4976723aea3e8a28c9d0d594daab25a6d90
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-05-16 19:37:33 +02:00
Lars Knoll
1756a84756 Limit the nesting depth of the Json parser
The parser is recursive and too deeply nested json would
cause it to exhaust the available stack space leading to
crashes.

We now abort parsing with a DeepNesting parse error if the
document is too deeply nested. The current nesting limit
is set to 1024, which should be more then enough for any
real JSON data set.

Change-Id: I4adea3fd727149f7342536d73cf4530361a0a3a1
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-05-16 04:25:11 +02:00
Kent Hansen
0e7a52b539 Revert "Temporarily disable -Woverloaded-virtual in headersclean test"
This reverts commit a17523805e56511465550a6a93a88b3fc3c8325a

The compatibility overloads were removed in change Icf108a80177155f21bb73c165fb8ab5d4e997bc2.

Change-Id: I4861f281451d66a1aa5f3525eea1773dfef0540e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-16 04:25:01 +02:00
Eskil Abrahamsen Blomfeldt
4959e6af8e Support specifying fallbacks in font request on QPA
Because the QPA font database would query fallback families inside
findFont(), support for requesting multiple font families in order
of preference (like QFont("Times New Roman, Arial")) did not work,
because the Arial fallback was never attempted. To fix this, we
pass in the queried fallbacks and make sure they are tried before
any platform specific fallbacks.

Task-number: QTBUG-20986
Change-Id: Idb2b717856f013ce2874f00a8debaff60176d2fc
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-05-16 04:24:58 +02:00
Konstantin Ritt
ba300f42bd QChar: add isSurrogate() and isNonCharacter() to the public API
+ QChar::LastValidCodePoint enum value that supercede the UNICODE_LAST_CODEPOINT macro
replace uses of hardcoded values with the new API; remove leftovers

Change-Id: I1395c9840b85fcb6b08e241b131794a98773c952
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-16 04:24:56 +02:00
Konstantin Ritt
e8199b599f QChar: add missing UCS-4 overloads, get rid of UCS-2 ones
inline all non-static members to a static ones (declared with QT_FASTCALL),
ushort converts automatically to uint and the conversion cost is minimal.

Task-Number: QTBUG-13052

Change-Id: I189a6f205736766adcd3de2d61cee71f30cc64f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-16 04:24:53 +02:00
Konstantin Ritt
3cfcceae43 QJpegHandler: add an embedded text support
texts for the textKeys are stored each in a separate COM(ment) section
so that the maximum text's size is almost 65KB

Task-number: QTBUG-10568
Task-number: QTBUG-111

Change-Id: I7d693741e10e5d78d497cb0af448160077350bb2
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-05-16 04:24:50 +02:00
Shane Kearns
2380765a2b Fix QFile::permissions for long filenames
When qt_ntfs_permission_lookup is used, QFile::permissions failed
for files with long filenames.
Also created a test case for this API, which revealed another bug.

Task-number: QTBUG-25629
Change-Id: I73b7676a9d059c0e782b3f701b2e6bbc92f671ed
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-05-16 04:24:43 +02:00
Martin Petersson
3e697188da tst_QNetworkReply: enable the ioGetFromBuiltinHttp test.
This can be enabled again now. The sender transfer test is still not
re-enabled since the test would take to long to run if sending
enough data to overwhelm the reciever's kernel buffers.

Change-Id: I4056fdca53ec8ebbcc53dfdc814d8bfdbc73f7ce
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-05-16 04:24:38 +02:00
Andy Shaw
cfb44c6528 Fix cases where functions are called with a drive and no slash
When a file is specified on a path that includes a drive letter
followed by a colon but no slash then it didn't always account
for the fact that this refers to the current path on that drive.
This fixes the problems in completeBaseName(), baseName() and
path().  Tests are also added for these three cases and some
others too.

Task-number: QTBUG-25353

Change-Id: I47a197c6af066f532442ad269be57597ec61303a
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-16 04:24:29 +02:00
Stephen Kelly
f16a77d783 Use IF(NOT TARGET ...) before creating imported targets.
Initially we didn't do this because someone could accidentally create
another target of a conflicting name, and used a variable to store whether we
have created the target already or not.

That wasn't adequeate to deal with finding the package in a scope
like a function, so we used a directory property. However, the directory
property is not valid in the same scopes as the defined target. For
example, finding a Qt module in both a directory and a subdirectory causes
a conflict.

As it is already unlikely that a target would be accidentally created with
a name like Qt5::Core, we should simply use the IF(TARGET) form.

Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27
Reviewed-by: David Faure <faure@kde.org>
2012-05-15 23:03:23 +02:00
Carl Schumann
4f7a6bdabe Add Q_UINT64_C to 64 bit integer literal.
On some systems prior to this change the code
would not build with the following error reported
by gcc:
error: integer constant is too large for 'long' type

Change-Id: I778bce9a72ccf3a41cdf17883d734082ed3fb4b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-15 23:03:23 +02:00
David Faure
c241d8921e Rename QMimeDatabase method for consistency.
Name is about mimetype names, while FileName is about, well, file names.

Task-number: QTBUG-25748
Change-Id: I34a9ac1a5fc06dc3e3855365e19c4dc7a1aa2671
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
2012-05-15 14:25:37 +02:00
Kent Hansen
f544d7189e Remove const char *-based connectNotify() API
This completes the transition from connectNotify(const char *) and
disconnectNotify(const char *) to the new QMetaMethod-based
functions.

Removed the old connectNotify autotests and renamed the
connectNotifyMethodXXX autotests to connectNotify, since there is
no longer any ambiguity about which overload is being tested.

Change-Id: Icf108a80177155f21bb73c165fb8ab5d4e997bc2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-15 04:57:37 +02:00