For all practical purposes, the fallback introduced here returns the
desired value. Having a fallback enables unconditional use of Q_ALIGNOF.
For compilers that provide native support for it, Q_ALIGNOF is otherwise
#defined in qcompilerdetection.h.
Change-Id: Ie148ca8936cbbf8b80fe87771a14797c39a9d30c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Internally we construct QByteArrays from QStaticByteArrays. For example
moc is generating QStaticByteArray structure for every string it saves.
New test cases check if a QByteArray constructed from a QStaticByteArray
behaves as a not statically constructed one.
Change-Id: Ia4aa9a1a5bc0209507636c683a782dda00eae85c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
QWorkspace had been called Q3Workspace before Qt4.0 finally released.
In a sense, it is a Qt3 support Widget. And QWorkspace has been
deprecated and replaced by QMdiArea at Qt4.3.
Change-Id: Iea1bf831c9960c23c2b21d51fdc7c13b303642ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This allows me to keep the UTF-8 invalid data in one safe place. I
won't need to copy & paste it.
Change-Id: Icb909d08b7f8d0e1ffbc28e01a0ba0c1fa9dccf0
Reviewed-by: David Faure <faure@kde.org>
QSharedPointer is about to become final.
Instead of inheriting from it to add implicit
conversions to and from QSslSocket*, make
QSslSocketPtr a typedef, and make the
conversions explicit.
Change-Id: I4eebb262ab5aef348f4d676f9e839325d4ed13da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSharedPointer is about to be made final. Instead
of inheriting from it to gain access to the
d-pointer, cast it to a layout-compatible struct
and access the pointer from there.
Assert liberally to ensure layout compatibility.
Change-Id: Ifc0fa6a6608e861469286673844325663f4f7fcc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove the inheritance hack used in
QDirIterator to gain access to QDir's
d-pointer by simply making QDirIterator
a friend of QDir.
This allows to turn QDir into a final class.
Change-Id: I97efef8714bb194d62b9fe5192ce240a90f2bf97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QString and QVariant are about to be marked
Q_DECL_FINAL_CLASS, so change inheritance to
composition.
At least this was private inheritance...
Change-Id: I43caaa6c03041b8f0bd0f7987ddb4c6ff8309e50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSharedPointer isn't meant to be used as a
base class.
Instead of inheriting from it to add implicit
conversions to and from QNetworkReply*, make
QNetworkReplyPtr a typedef, overload two
oft-used functions to take a QNetworkReplyPtr
in addition to QNetworkReply*, and otherwise
make the conversions explicit.
Change-Id: I1eff1793a19f2d5bad1cce8de74c0786675a50f3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
The QLocalSocket is using a QLocalUnixSocket which is a QTcpSocket
that has buffering enabled. Because QLocalSocket is a QIODevice it
also has its own read buffer. By opening the QIODevice Unbuffered
we only use the buffer in the QLocalUnixSocket.
Change-Id: I4b9091522f73b0831b20efb4a2a00c2603fc748b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Key events were not sent to items on graphics view after the change
412dbdf410. This is because the change
only checks if QGuiApplication::focusObject() exists. Qt::ImEnabled
needs to be checked too.
Change-Id: I2a78af717a7a1a5d84fbc8b521253bdc25b43286
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Use the heuristic that windows that are not an
NSPanel and has the MaximizedButtonHint get the
fullscreen button.
Change-Id: I9a3520b7e4cd1833421d5d2f5b73da7edbfc3e74
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Change-Id: Ibc3a95f3560af909a45d147098184c2194187932
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
QMap used to use a skiplist in Qt 4.x, which has variable
sized nodes and we can thus not optimise using custom
allocators.
The rewrite now uses a red-black tree, and all allocations
and tree operations happen in the cpp file. This will allow
us to introduce custom allocation schemes in later versions
of Qt.
Added some more tests and a benchmark. Memory consumption
of the new QMap implementation is pretty much the same as before.
Performance of insertion and lookup has increased by 10-30%. iteration
is slower, but still extremely fast and should not matter compared
to the work usually done when iterating.
Change-Id: I8796c0e4b207d01111e2ead7ae55afb464dd88f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The regular expression should look for underscores in addition to
alphanumeric characters.
Change-Id: Idc3dbd67291ec1420f818d74fba8413b1e7cbcf1
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Free form tentative commit proved to require too much fiddling on
rendered text vs. logical content. Needs simpler mechanism.
Change-Id: Ia4e341abf342d25675fd1129efb11094dde410b2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Just so I have a similar workflow all over the place.
Change-Id: I99df5042eac1b4fbf3613f339e8a4522f94ed1f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Was not emitted when removed by input method event.
Change-Id: Ia2c0dcb09d42826188d4612f4c1705a41874a31d
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Fixed Q_WS_WIN flagging to Q_OS_WIN in QPrinter API and related
implementation to make API match the documentation and Qt 4.8.
Also Removed the unused internal HDC related functions from the API,
that were previously behind Q_WS_WIN flag.
Some of the properties tested are documented to be valid for native
print engine only in X11 environment, so skipped testing those in
non-xcb environments.
Copy collation is also apparently not supported in Windows native print
engine, though this seems to be undocumented, so skipped that only in
Windows.
At least one of the test blocks in tst_QPrinter::valuePreservation()
failed due to default printer not getting set properly, so fixed that,
too.
Task-number: QTBUG-24191
Task-number: QTBUG-22927
Change-Id: I44a5e3d647a1279fcc7f1e99de6881f9be330246
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The QApplication::setGraphicsSystem() call is entirely vestigial after the
QPA rearchitecting of Qt. Deprecate it to give people a heads up that their
original intent no longer has any impact on their application.
Change-Id: I21838431db1057f7f7858b4a434ae0eebd2317de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reread the environment, and update the locale data on request.
Also fix a small bug where the time format wasn't inherited from
the LANG environment variable if LC_TIME wasn't set.
Change-Id: I619447603ade19d5587b427491cfd9c8fe814858
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don't assume that the global static is a function. Instead, create a
class that is friends.
Change-Id: I992f4d819b367899b19d95b4983e6b243f0ed932
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
GCC 3.3 is no longer supported. IRIX is no longer supported.
Change-Id: I1656a6fdcf2b244f0f6c812e71b0e793d37fb98b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Any message/error in mkspecs or qmake feature files ends up confusing
the current arch detection logic. Instead, search for
"Project MESSAGE: .* Architecture: <arch>".
Change-Id: I308932a5b75f3a1fcbc4fe30c74faf2e83b2d752
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Cannot have double-to-float conversions inside { } in C++11.
Change-Id: I13c27307efd703420b6667d919bb42c2ee82e6cc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
The static library needs to link to zlib too, so that the plugins
using this library link to zlib.
At runtime this doesn't make a difference because -system-zlib means
QtCore is linked to zlib and the system zlib shared library was
loaded, so the symbols are resolved. However, since -Wl,-no-undefined
was added to the build, the plugin must link to zlib explicitly too.
Change-Id: I10d6df8814e823079fee76ae6a7d5b55057c9daf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
The symbol must be exported from QtGui for the plugins to be able to
see it.
Also, fix the build in namespaced case: cannot use extern in
QtPlatformSupport because it's not compiled into the Qt namespace.
Change-Id: I029533f3524e3cbf6c87aed79c1f2e7b55aebb9b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
The base class has a virtual destructor, so the destructor is already
virtual. Make it non-implicit so that the virtual table and other
virtual inline methods don't get emitted everywhere.
Change-Id: I15296c1114086ff0b1da701ccd51525bec99d76b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This must have been a mistake. IA-64 processors used to contain an
IA-32 core, which supported SSE2. However, the IA-64 mode supported no
such thing.
Change-Id: I731c6018166af6b897cb697c68aad4ef3ae93132
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
permits relocatable qmake installations in, say, $sysroot/hosttools/.
note that it makes patently no sense to have a relative Prefix when
using a relative Sysroot.
Change-Id: I36e5149acb20a885c3cd244bc9d67aa48b01a56f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
this is needed for backwards-compatibility, and generally makes sense.
Task-number: QTBUG-24839
Change-Id: I42b008a9dfb43cc2ebe49c8baa2c29f5d6a75897
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This completes 6c98fd2, for systems where default codec is not UTF8.
Change-Id: I94795785d5d172558c40c06bd3ef4ffaba1624c5
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Previously the primary sceen number wasn't stripped before adding the
actual screen number, resulting in names such as ":0.0.0".
Change-Id: Ifbcf12dcf1c200fd6bc5e4b95a5d82483957e0d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Serializing an empty object path was crashing with
> arguments to dbus_message_iter_append_basic() were incorrect,
> assertion "_dbus_check_is_valid_path (*string_p)" failed in file
> dbus-message.c line 2555.
Thiago says this depends on the libdbus build settings, which is why
it didn't happen to everyone. OpenSUSE-12.1 here.
Change-Id: I657d28d5d915706a22abfd273aad88d20e2d112a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When writeDatagram is called without first binding the UDP socket,
then bind it as QHostAddress::Any.
This allows the same socket to be used to sent to both IPv4 and
IPv6 destination addresses.
Allowing the OS to autobind the socket inside sendTo() may
result in a single protocol socket.
Task-number: QTBUG-5275
Change-Id: I2b76507e8a8a38369c6eafb61ce4191d1d6cc930
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
It was only implemented on Mac OSX until now (all this came from the
QDesktopServices code).
Change-Id: I7fd81d80ca77cf0ca6c213f59813a6163abe7dc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The code was only allocating memory for the next insertion
leading to a reallocation of the whole data for every
single insertion.
The code now reserves some space and uses a decent growth
strategy to avoid repeated reallocs.
Change-Id: I48b0feab71ba8ca73e7037f8460080f198b2f009
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
config.tests/unix/freetype.pri has a !cross_compile flag, so we must
find freetype using the proper detection methods. The detection was
inside an X11 section of configure, so move that out.
And use the results of that detection, now that QMAKE_CFLAGS_X11 isn't
used (since we're not building X11 in QtPlatformSupport).
Change-Id: Ic8f5cfb7263849bfb12967756def2b5aaa244872
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>