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>
What it states is simply not true, at least certainly
not since QPA has been introduced.
Change-Id: If8aa2120cf5fc9ca85f4f0e6832b2115a5b71fe1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
QSslSocket overrides one version of QAbstractSocket::connectToHost.
Since these functions were made virtual, this now hides the other
overloads.
Added a using statement to make the other overloads visible.
Change-Id: Ia48fdc9bd67936c75c25bb24dabd26a723bb7a05
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This function takes a qint64 argument, not an int argument.
peerwireclient.h:119:10: warning: 'PeerWireClient::setReadBufferSize'
hides overloaded virtual function [-Woverloaded-virtual]
void setReadBufferSize(int size);
^
src/network/socket/qabstractsocket.h:162:18: note: hidden overloaded
virtual function 'QAbstractSocket::setReadBufferSize' declared here
virtual void setReadBufferSize(qint64 size);
^
Change-Id: I29b67b216147771ff2d662d309d2c31d977e9d3f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Add (private) API to QCFString:
static QString toQString(NSString *)
static NSString *toNSString(const QString &)
Add implementation to qcore_mac_objc.mm. Keep the
mac_cpp since it's used for building qmake as well
as bootstrapping.
Replace usage of NSString conversion functions
in the cocoa and corewlan plugin with QCFString.
Change-Id: I9f34edd5231255aef9d8d6e9a60306174bb279b3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Otherwise, the HTTP request won't be sent if bearer is not compiled.
Change-Id: I9a8171fde6fe5b2db0405b4af6e1d52ac4528502
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Task-number: QTBUG-23982
The platform plugin loader was searching for plugins
in qtbase/bin and would segfault when checking if
the qmlscene binary was a plugin.
Test if "../Plugins" actually exists before setting
it as the platform plugin path.
Change-Id: Ibd887b5c5045d23e3eb62867dc7598e09d3918ad
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Currently, font enumeration is very slow in windows platform, it will take
several seconds to enumerate all fonts for the first time. This patch
cache the font information queried from font registry, it can
significantly speed up font enumeration.
Change-Id: Ic783877b7f3db3facf24965b0c5d669b22d40c61
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made QString::operator=(QLatin1String) work in that case.
Change-Id: Ie77eabd2f8f036531d67cd8051a7b6305b386ccf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QTextStream and QDebug << operators work in that case.
Change-Id: I94d051ce2ebfb2d2a403b96d25e040c80a54bf7c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QString(QLatin1String) constructor work in that case.
Change-Id: I4f4f07a956144b7ea4aa9c58a61c755fb99ef1b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QLatin1String comparison operators work in that case.
Change-Id: I234ba851e67a6f5cfbb46fb6f0b22623ce40be28
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
First, we do not need to have the QT_INTERLOCKED_REMOVE_VOLATILE(a)
macro anymore either, since the value stored in QBasicAtomicInteger is
not volatile.
Windows provides Interlocked*Pointer() functions in some configurations,
so we provide a partial specialization of QAtomicOps for pointer types.
For integer types, QAtomicOps selects an implementation based on the
size of the type. At the moment, we only support 32-bit types, but it
will be possible to add 64-bit later.
Note that the 32-bit specialization of QAtomicOpsBySize declares the
Type typedef as long, not int, since the Windows Interlocked*() API
takes parameters as longs and long pointers. Since this typedef differs
from the type given to QBasicAtomicInteger<T> by the QBasicAtomicInt
typedef, we need to templatise the _q_value parameter separately from
the other arguments in QGenericAtomicOps.
This templatisation would be necessary to port other architectures, such
as PA_RISC, where we need to have an int[4] array in the atomic type
while the arguments do not need this array.
Change-Id: Id71fa1ae334da2023553cb402b45e6c285f1d344
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Handle the case of an empty DESTDIR.
(cherry picked from commit 122fa6b53c33364a4687919191e55899acb43797)
Change-Id: I0c2eec5736d0944b8ee97abdfa3f1121e7d8db4b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Unlike for libraries, $(TARGET) already contains $(DESTDIR).
Changing to $(DESTDIR) does break the command in that case.
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 7eb770aed35fee50ff98c12e390dcb02c72b5132)
Change-Id: Idd0f30d52db432062917a1c956c3af73e6c8a6a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
The qt_mac_waitForMoreModalSessionEvents() is identical to
qt_mac_waitForMoreEvents(), except that it passes a different inMode
parameter to [NSApp nextEventMatchingMask]. Change the latter function
to take the mode as a parameter itself, defaulting to the default mode.
Change the dequeue parameter to [NSApp nextEventMatchingMask] from YES
to NO. Having the function dequeue the event, and then immediately
reposting the event is not necessary.
Change-Id: Iba45d41ad3ff4d5721d1068e6d5c78585cb15810
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
This file was removed in commit ba9302b8a9
Change-Id: Ib3a70877f6f6848c8cf072faf13da93abbe186f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
in topLevelObjects() we should use "root->object()" instead of
"w->accessibleRoot()->object() to get the object attached to the
accessible interface. This is because "w->accessibleRoot()"
will create a new QAccessibleWidget(or its subclass) object
and this object is never released.
Change-Id: I34292b467b51d6cc439f0a1a45cd74d5f8a6a5a8
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
`make check' is intended primarily for running functional tests.
For the most part, it does not make sense to run benchmarks in the same
test environment as the functional tests.
Change-Id: I79f867fdab295bdbd4c4b3c785dfd7ede520022e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Presumably the contents from qmetaobject_p.h were copied
because qmetaobjectbuilder originally lived outside of qtbase,
and private headers could not be included from other modules.
But now we can just include the right headers.
Change-Id: I975df1ea94455f1bf0db1d8024de8f5379fc9fc7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
- Needed to add toLower() for compare as c:\ and C:\ was causing
a failure.
Change-Id: Idd55774d118b7249e88362688166b4f9d9712c7c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
- Changed to set working directory based on subprogram
stdinprocess's directory location.
- Changed QProcess execution of subprograms to use
relative paths.
Change-Id: Idbccca635f0f61adba9721bcceeceb0a8a961dcf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Rename some of the test functions to improve consistency, and change the
order so that all the xfail tests are together (some new xpass tests
will be added later).
Change-Id: Ice1ac5bf61bc26109bb0d08f72eb74e1a0424101
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The test simply generates each possible pair of Pass, Fail and Skip
results. At present the test simply serves to demonstrate the current
shortcomings of testlib's plain text logging, namely:
* If a test function passes for all data rows, that is counted as one
pass, but each skipped or failed row counts as one skip or fail.
* Only skipped and failed rows are reported individually in the test
output. Passed rows are not reported, so it is impossible to see how
many rows were executed.
* A skip followed by a pass will be reported as an overall pass for the
test function, but the same rows in reverse order will not report any
overall result for the test function.
Future commits will attempt to correct these problems.
Task-number: QTBUG-22124
Change-Id: If8c7ea15fc43ba9a1bccd0e881c1efc18e705b25
Reviewed-by: Rohan McGovern <rohan.mcgovern@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>
- The minimal platform plugin returns null and was causing segfault.
Change-Id: Ied262692f77e9801c3d3451de7f21539f7686ca4
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
QPlatformPixmap::fromFile is doing the null check,
QRasterPlatformPixmap::fromData is doing the null check as
well. Add the null check to QPlatformPixmap::fromData as
well. This would have avoided a crash in the directfb plugin.
Change-Id: Ifc904b2df2424e86bf0992d4e28dc256530be02d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
One of them was a real error, that could
lead to Data::alloc containing wrong values.
Change-Id: I48315ef6fd59188630107ebbe7bf8dbaa5da689e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Bradley T. Hughes <bradley.hughes@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>
There was a few errors coming from other components
using qtbase - error: declaration of 'o' shadows a
member of 'this' [-Werror=shadow].
Change-Id: Ib394f404370f001e68fde8b424cd5fff527d8fe7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
- Remove dependency of the Windows platform plugin on
QtWidgets.
Change-Id: Iceb876ba7df46b49966af0fc101816654eedb5c5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Change-Id: I10ef89e2fab31c7f1c9ac67b2234f509fb3f28ab
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QBasicMutex is a POD and can be used as a static global object.
in qpicture.cpp factoryLoader is used only once, and under the mutex, so
there is no need for Q_GLOBAL_STATIC for it, it can be a function static
in qhostinfo_unix.cpp the code seemed wrong while compiled with
namespace and QT_NO_GETADDRINFO. I also could get rid of one include
because it was included earlier.
Change-Id: I3c700203c3e067266c20733f4bda8031446dbb86
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This came from replacing d->parsingMode with parsingMode when moving
the method to the Private class.
Change-Id: I5a025ea1128dacda97d265d401a329dbbbfb0ff7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
SSL context was destroyed on disconnect. This makes it impossible to
decrypt buffered encrypted data. So if there is encrypted data in the
receive buffers, then don't destroy the ssl context until the socket is
destroyed.
Task-Number: QTBUG-23607
Change-Id: I16a7b4fa006647ec73049c90cdbc72686696850f
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Richard J. Moore <rich@kde.org>
Symbian specific code in libtiff was added by commit
6ddf09085f1e8a3cc83c4ee0c77c433d26819c35 in Qt4, code in libpng was
added by commit 66fb4038649cfd1d660204bf7c70f99a409ede4f in Qt4, so
they are removed.
Symbian specific code in freetype was copied from upstream, so kept
untouched.
Change-Id: I74f169d9283eefd91ec2e97cbd1b8f03dc449380
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Before -mp and -no-mp affected only projects built with Qt.
There was no way to turn off msvc_mp for the Qt build.
Qt projects can add msvc_mp themselves.
Task-number: QTBUG-23929
Change-Id: I08b9ec762c59d2604635d73396044a74f717728c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Unify the includes for resolver function on unix-like platforms
to avoid build failures on BSD platforms.
Change-Id: I9accd7077d5a319a2c93642e011492d0fc779394
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
The end parameter passed to removeSectionsFromSpans is off by one.
removeSectionsFromSpans can currently handle/ignore it, but it is
still wrong.
Change-Id: I9148bd106504a37a5c8fd72928ab84c669eebcdb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Implements the new notification signal in all QSql drivers which use notifcation.
In qt5 only ibase and psql have a notification implementation.
PSQL differentiates correctly between 'SelfSource' and 'OtherSource' whereas
ibase only signals 'UnknownSource' as a default implementation.
Change-Id: Ifcaa139b7a980ed852cf817b3f93284609360ca7
Reviewed-by: Torben Dannhauer <torben@dannhauer.info>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>