This also changes behavior for negative sizes, but those cases could be
viewed as errors on the client side, anyway.
Change-Id: I9e56f2ba53b1edcd9f2faa5384c7d77f6823e24a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These have been added for std::shared_ptr compatibility,
but in particular to allow tst_qnetworkreply && friends
to drop the implicit conversions added to QSP by
inheritance, so QSP can become final.
Change-Id: I0f0401b02125d65622e52393b40a3b10bd9a850c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
this is a complete bastardization of the concept and breaks the (unused)
debugging feature to create proper unix makefiles under windows, but
apparently it permits cross-compiling unix targets under windows.
Change-Id: I4ee95a20e7d6a6b2063ec7aa22f52c1a97d78a77
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Cached font was used regardless of the format, resulting in incorrect
advance in some cases when default format differed from the cached
format.
Task-number: QTBUG-24188
Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
All C++-2011-specific constructors, operators and methods may be inline
only in Qt. Since an implementation in the header file does not seem to
be possible for QMimeType without breaking backward compatiblity the
move constructor has to disappear altogether.
See also the discussion at
http://codereview.qt-project.org/#change,19150
Change-Id: If07347a51a1ae5bd4c2d292dac835592ede4b370
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The provided implementation breaks backward compatiblity, and therefore
has to disappear altogether.
See also the discussion at
http://codereview.qt-project.org/#change,19150
Change-Id: Idf6e4a2c4b623458217541485e4aab0837909d66
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Handle the action message on the application delegate.
Change-Id: I23686fd6e936a4dbbb141da3dd04a64cbf6a051a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
qWaitForWindowShown() should check window->isActive() instead of
window->isExposed() and return false if timeout.
Add two new qWaitForWindowActive() and qWaitForWindowExposed()
functions.
Change-Id: Idd9601805c2e84b0d36ddd5471031b627d289953
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Some compilers define the architecture to one leading to detecting
'1' as target architecture. Always undef the architecture name.
Compilers:
gcc version 4.6.3 (Debian 4.6.3-1) has '#define i386 1'
gcc version 4.5.3 (Broadcom stbgcc-4.5.3-1.3) has '#define mips 1'
Change-Id: I7af1bb743579be472467c74e6c08638648823ef3
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This reverts part of commit 8397a44bed.
Change-Id: I1d2ec018167faeb23a9343b209bb0ff2d8db311d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Now that QPointer is implemented in an efficient manner, there is really no need
to avoid it, deprecating it just adds a large amount of churn.
Change-Id: I32116faf14c3b07631d59ba9585f9ce422531646
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Commit 3fe1eed0 changed the QVERIFY in line 1354 to QCOMPARE. This was
done to work around a (not yet understood) compiler issue. That however
was wrong, as char pointers in QCOMPARE are assumed to point to
'\0'-terminated strings and will get dereferenced.
In this case the intent was to compare the actual pointer values, as the
pointers point past the end of the array and should not be dereferenced.
Explicitly casting to (void *) and using QCOMPARE will not only keep the
intent, it will hopefully also provide meaningful output on failures. As
such the fix was applied throughout the test.
Change-Id: Ib0968df492ccc11d7c391bb69037cd7241e55493
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
As the comments says:they are broken by design, and replaced with other
functions. The purpose of their existence is for BIC with Qt4.5.
Change-Id: I9453f816a7b7c6812499b89b7c60f0fd99dea27c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The DBus metatype system and marshaller is required for determining
the dbus-signature of built-in Qt types, for example QPoint.
Change-Id: I8860ab3b88827aeb8063dfb79c4a9b28c0a20c0f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The DNS server can legitimately include NS and A records for
the authoritative name server in addition to the DNS records
that were requested.
These are now ignored when checking the reply (we only check
results that match the query, rather than failing if a result
is for a different host name than the query).
Task-number: QTBUG-24698
Change-Id: I327f31d58cdca50c7df6b32b275d7f28b56405f0
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
When binding with the DefaultForPlatform bindmode, then don't set
options on the socket related to sharability, leave them at the
platform default.
This restores compatiblity with Qt 4
Change-Id: I612a3acb976f08446b4eef03ccdcdf84b3477c3c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
The root topicref is now always index.dita, unless
there is no index.dita. But there is always a root
topicref that has the project name as its navtitle,
even if there is no index.dita file to map it to.
Task-number: Mzilla bug - 7229
Change-Id: I0c9fdf1a2e3ba847fe8975a0745667189a77a755
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
For OnFieldChange and OnRowChange, we don't want more than one row in
the cache with uncommitted changes. This could happen if deletion in
the database fails while other changes are pending.
Chosen solution is to return false if other rows have pending changes.
Also, we only allow 1 row removed at a time.
Updated test, changes and documentation.
Change-Id: I68baf6d221789b4754e891535070011c759a2155
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
The model can never do a good job of knowing when user moves to a
new row in the view. Faking it by detecting when another row
is changed was not a good solution because it cannot detect
when the last edited row is left.
Either the view should automatically submit when the user leaves
a row or the application should provide a way to submit.
This change made it possible to reuse the logic of flags() in
setData().
Change-Id: I2550e5b113bceba1a852fc21203babeca07c5748
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
For OnFieldChange and OnRowChange, inserting rows should not be
allowed if there are pending changes in cache.
Change-Id: Ia794332959a35a1de87e798ba1a74ace3dfae68f
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
For OnFieldChange and OnRowChange, before submitting new changes,
setData() and setRecord() attempt to submit pending changes and
revert them upon failure. However, they fail to consider that
reverting pending insertions removes rows from the model. As a
result, the new change can be applied to a row higher than intended.
One possible solution would be to adjust the targetted index for the
removed rows, so that the intended row is affected by the new change.
But this still causes the strange editing experience as rows jump
up just as they are being edited.
It does not seem right in the first place for the model to initiate
reverting changes. It should be up to the application to decide what
to do when data cannot be committed. In particular, setData() and
setRecord() should not have the side effect of reverting already
pending changes.
The chosen solution is simply to refuse new changes that don't make
sense for the edit strategy. For OnFieldChange, flag() will
indicate read-only when editing is blocked by a pending change.
Since setData() and setRecord() submit data immediately for
OnFieldChange, it no longer makes sense to resubmit changes
automatically before a new change.
For OnRowChange, setData() keeps the behavior of automatically
submitting a pending row before starting on a new row. This is
historical behavior and is probably motivated by the fact that
QTableView does not automatically call submit() when editing leaves a
row. The obvious shortcoming of this is that the last row to be edited
will not be submitted automatically. It also prevents us from flagging
rows other than the pending row as read-only.
For OnRowChange, setRecord(), being row-oriented by nature, should
submit the change immediately rather than waiting for the next call
to setRecord(). This makes setRecord() consistent with insertRecord().
Change-Id: Icb4019d8b7c53a7ee48f8121a7a525e8bc35d523
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
The define is removed and only added an include.
Change-Id: I85090023cb9eb33f83ccc7fe2ab69556b4ff89fb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Define NOTIFYICON_VERSION_4 if it is not already defined.
Change-Id: Ic432cbebf18f8b1e8b4727659dcedd7063e126ee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
In QTBUG-24807 there is a test case that shows a case when a segmentation
fault happens inside isAncestorOf. When the whole application loses the
focus, e.g. when it is minimized or other application receives the focus,
QGuiApplication::focusWindow() returns a null pointer, so we need to
do a check before proceed inside of isActive.
Task-number: QTBUG-24807
Change-Id: I732c92bb9f236804ede5e89592f6e6609a4711b9
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Adds missing QT_NO_ACCESSIBILITY checks where required to build
without accessibility support.
Change-Id: Id98ecdcb9b351289b21dc2d382100d0b63857db9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Add QCoccoaClipboard which wraps the existing
QMacPasteboard implementation. Remove unused
QClipboard integration code from qmacclipboard.mm
Change mime type cleanup from using qAddPostRoutine
to using an explicit call to destroyMimieTypes in
the cocoa platform integration destructor. This is
necessary to ensure cleanup happens in the correct
order on app shutdown.
Change-Id: Ief0e0d996b04c8e84e9fd2cd3a17fb5bd73bb761
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The tst_QSharedPointer generate another Process to test some invalid
codes, and it expect that the prcoess will crash and return a non-zero
value.
The process which is a console application was linked to windows
subsystem, and QProcess seems can not get its return value. This
cause the unit test fail.
In addition, when the process crash under debug mode, a debug error
report-dialog will appear, which is very annoying, so I suppress it too.
Task-number: QTBUG-24160
Change-Id: Ia1c872d4515c83b0aa516bcfe3783f59797d2d49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Otherwise, you don't have any socket engine handler created when
directly setting a proxy to a socket.
Change-Id: I35cd7f52331672a6d3e7bcdf817c0fe1fd1e7de3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
We should only query the position for top levels, otherwise trust the
position given in the event.
Change-Id: Ic29f25983af3e2c2f27eeb527c08069435ac938c
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
There should be a clear QWidget free path for people with no interest in
legacy QWidget functionality. Adding this option to configure makes this
path readily accessible and hence testable.
Change-Id: If87c1063fcf4c46f5280836126c11999feaa9f8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
There was no development done to make this working on Qt 5
Change-Id: Ia08d53c6680a65cb1e60a30e55caa992eaa54bc7
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Made faster by actually waiting for the window to be exposed, using
similar waiting logic as qWait(). Should speed up autotests that use it
quite a bit.
Change-Id: I628c6110a554fdbbf5bed7e91f57c2fe341113ed
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
At least on mac g++ badly wants to copy the event and
cannot use the copy ctor. The sensible solution is thus
to use pointers. This is in line with QCoreApplication::sendEvent.
Change-Id: Icb58852be351ab04ffa17069989d7a07d4b377da
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
According to the new module name convention, QtSql should be replaced
with Qt SQL in documentation.
Task-number: QTBUG-24775
Change-Id: I712ef17c8245d30fe5e3cf879ef6e3e6aa2ff75c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Since QtPrintSupport does not have access to the internals of the print
engine on Mac OS X (it lives in the platform plugin). We instead use the
NSPrintInfoFromPrintEngine() invokable method in
QPlatformNativeInterface to return an NSPrintInfo* that we can use where
needed, or we use QPrintEngine::property()/setProperty() to communicate
with the engine.
This commit disables the generic UNIX dialogs and CUPS support on
Mac OS X, ensuring that the default format on Mac OS X is the
QPrinter::NativeFormat (previously qprinter.cpp would force PdfFormat as
default on Q_OS_UNIX which is also defined on Mac OS X).
The rest of the changes are straight forward porting. The methods:
extern void macStartInterceptWindowTitle(QWidget *window);
extern void macStopInterceptWindowTitle();
don't exist anymore, so don't use them. QMacCocoaAutoReleasePool also
doens't work, so use NSAutoreleasePool directly.
Change-Id: I341609e5efa53cadf8d174e4b282cbcae93e39e8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Add an invokable method that takes the QPrintEngine (which will
always be a QMacPrintEngine) and return the NSPrintInfo* from the
QMacPrintEnginePrivate. This will be used by the native dialogs in
QtPrintSupport to get/set printer settings.
Change-Id: If1e49027e8f0d505656db51be1f40a23f60e8e57
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
When we need to use PMPrintSession, PMPrintSettings, and PMPageLayout,
get these directly from the NSPrintInfo when needed. This avoids us
needing to keep the settings in sync. The native dialogs can then only
rely on getting a pointer to NSPrintInfo (to be done in a future
commit).
Change-Id: I4720284dcf999e454f86766b4291fbda7bf3c537
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This is used to create the actual QPrintEngine and to query the system
about printer information.
The QCocoaPrinterSupport actually lives in the Cocoa platform plugin,
so the QCocoaPrinterSupportPlugin uses the
createPlatformPrinterSupport() function in the QPlatformNativeInterface
(since the latter is a QObject). This is done to avoid adding a printing
related virtual function to QPlatformIntegration (since we have plans
to do a new printing API in the future).
Change-Id: I8bf9be668ff8ae1d07840e2af1e0846dc3299334
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>