The code assumed that CGImageForProposedRect would return a sensible
sized image, but that can return basically any size (depending on the
NSImage's image representations). In the case of the bug report this is
a 1024x1024 pixmap when requesting a pixmap of size 64x64 and larger.
Make sure that we return a pixmap of the exact requested size.
For this, themeHint must also return sizes in device coordinates.
Task-number: QTBUG-35009
Change-Id: Iaae11023bab6d4122815ca4010aab6967dfb18a0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The front-end functions in the QTest namespace are declared static
inline, so the compiler can complain. Make it not do so.
Change-Id: I4036c85010e02ef22a8071ed05e49173dfc64729
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Since now in Qt5 the moc does full macro substitution, it needs to handle
the defines passed is command argument, even if they span over multiple
tokens, or if they do not have any token.
Example:
moc '-DCOMPLEX=QVector<int>' '-DEMPTY=' foo.h
[ChangeLog][moc] Fixed passing -D of a macro defined to something more
complex than a single identifier.
Task-number: QTBUG-33668
Change-Id: Ie8131de215f1659a24af4778d52ee40cda19759f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
The patch reduces amount of allocations during
string parsing by using QStringRef. The operation
is safe as neither QDate nor QTime uses QString as
a storage type
Change-Id: Ib9f40d86e8e420653ac4fe8ba883d554331ffc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt since approximately 4.4 has set the verify callback on both the SSL
store and the SSL context. Only the latter is actually needed. This is
normally not a problem, but openssl prior to 1.0.2 uses the verify
code to find the intermediate certificates for any local certificate
that has been set which can lead to verification errors for the local
certificate to be emitted.
Task-number: QTBUG-33228
Task-number: QTBUG-7200
Task-number: QTBUG-24234
Change-Id: Ie4115e7f7faa1267ea9b807c01b1ed6604c4a16c
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This otherwise crashed:
QCommandLineOotion opt("with=equals");
parser.isSet(opt);
Can't write a unit test because it produces a warning.
Change-Id: Ifc67f20bb4b16b96d93dffbe4e82e6cc8a17584d
Reviewed-by: David Faure <david.faure@kdab.com>
This header is used by qevdevmousehandler.cpp, so it's not a bad idea
to check that it exists as early as here. Apparently, FreeBSD's Linux
support has linux/input.h, so the "evdev" test was passing and then
the build would fail later.
Task-number: QTBUG-36205
Change-Id: Iab9788350a9f4c90d355524769a7a396679fd218
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
update-mime-database does not exist, so there is no point in
trying to build this test.
Change-Id: Id60f2f8fc3af33d3f7ae2fb4f1042356b60f6596
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
This fixes QtQuick key handling not propagating key events beyond the
specific onXPressed handlers, due to erroneously thinking those exist,
when signal spy callbacks are present.
Considering signal spies for isSignalConnected() goes back to 87239ef6 in
Qt4, and seems to be there just due to this code being based on activate(),
where this check obviously makes sense.
Change-Id: Iad41e42a8d3ee2a16a55be7d1a7cdc51484981ce
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Right now /dev/fb0 is hardcoded. This is not ideal. Therefore
QT_QPA_EGLFS_FB is introduced. This environment variable can be set to
a different framebuffer device. Once it is set, eglfs will use the
specific device. This is similar to linuxfb's fb=... plugin parameter.
The actual behavior depends on the board-specific implementations.
For now only iMX6 has real support. It extracts the index from the
device name as bind the EGL display to the corresponding framebuffer
using the vendor-specific fbGetDisplayByIndex(). Other hooks can
follow suit later on.
With this patch eglfs is at least on par with linuxfb, meaning that,
if the board supports it, different apps can run on different screens.
Task-number: QTBUG-36113
Change-Id: Ia3c88bd06e108bc668433e3c5c3fce34a5a0e73d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
When building with debug, all SLOT or SIGNAL macros will
expand to a function call, and then function will call
QThreadData::current(), which will set
QCoreApplication::theMainThread if it has not already been
done. Since Qt Widgets has these macros in the static
initialization of the library, we would register the
Android main thread as the main thread of Qt, which would
mean that the actual application object was created on
a different thread than the main thread. This caused warnings
to appear, and also triggered a race condition which
caused widget applications to sometimes show a black screen
instead of content on startup when run with the OpenGL plugin.
Task-number: QTBUG-35048
Change-Id: Ie8979f5e7cd5662f8d7dd276de9f94f27cc120b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's common to check the Android API level at runtime to determine
what functionality is available. This change provides a convenient
way to get the Android SDK version (API level) from c++.
Change-Id: I88f65ae87e0fa8ac0affefffbd1b1bba855c9f46
Reviewed-by: BogDan Vatra <bogdan@kde.org>
storePixel<QPixelLayout::BPP32> would have been called by
storePixels<QPixelLayout::BPP32> but that function has an overload that
uses memcpy instead. So it's really unused.
Found by Clang 3.4.
Change-Id: I661804e273486d3469221fdd362a24cd77cfb8a7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
it leads to pathological cases where the number of loop iterations may
go way beyond the reasonable.
this means that users need to avoid using the = operator in alternative
branches that lead to different sources/subdirectories being included
into the project. this is a bit of a corner case anyway, as people
usually add directly to SOURCES/SUBDIRS.
Task-number: QTCREATORBUG-1595
Change-Id: I7783e318fbc2790f6a853ba4e3f4a12db881feb5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/30bd7fcce1aef974f6af9eaa6532aa1f2b6192d2)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
some qt prfs use this variable, so better set it it to avoid some noise.
Change-Id: I606c88dd7664b1cd8b490d60badd5c6bf80fd1c9
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/e64cc71194cbe283dfe9bd2cd688f01fcdcadf34)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
... except where they actually contain variable expansions.
unescaped backslashes in double quoted strings aren't nice, and
apparently actually break with old solaris shells.
Task-number: QTBUG-14167
Change-Id: I703694b6ac7ab71d9293c049d77212e20dd5bcb0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... to have a real world test case for uploading via SSL,
QHttpMultiPart (+ resetting) etc.
Change-Id: I004dd6f2507776b2fb8ebe1f02625b40abff6261
Reviewed-by: Richard J. Moore <rich@kde.org>
Passing -no-xcb disables xcb and related configuration tests
completely so for example QT_NO_XRENDER is not defined. This results
in linker errors in glxconvenience with -no-xcb since the XRender
calls are compiled in without linking to the library.
The XRender, XInput and such tests are not strictly xcb related and
may be used from elsewhere, for example glxconvenience which has
nothing to do with xcb. Therefore these tests are moved in configure
so that they are run even when xcb is disabled.
Task-number: QTBUG-35644
Change-Id: I77871612ea5f6711ecafd8ca53aac6c516c19e2e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Otherwise you get:
undefined reference to `vtable for QAbstractSocketEngine'
when -developer-build is not used.
Change-Id: I444140736a6bf736894dc12a20f6a4d48af2678e
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Otherwise you get:
undefined reference to `qt_qhostinfo_clear_cache()'
Change-Id: I32313f290b9e4236440ae01afe12285d4539be60
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
List all of the default role names, and mention that the function
must be overridden if the model is used within QML.
Change-Id: I6ced5ac74143dcb97c527da2a6a23aa9d21f70e5
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This is a partial revert of 39e04b0222.
The original change moved the special make install target path logic
into the logic for the app template to make it possible to remove the
condition that excluded builds inside the Qt directory. This was
to make it possible to build examples in the Qt directory for Android
without moving them. However, this broke user library projects,
specifically when they were part of a subdirs project and should
have been automatically installed into the Android package. This
patch brings back the logic but only enables it for library projects,
meaning that the only examples inside Qt which cannot be built
correctly are library projects (which didn't work anyway).
[ChangeLog][Android] Fixed regression in "make install" on
library projects on Android so they can be used inside subdirs
projects again.
Task-number: QTBUG-34781
Change-Id: Iabf53ed68845b2ddd4ae66656e1372c96185660e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Added calls to clear the write and read buffers when
- setSocketDescriptor is called
- abort is called
Removed clears the read and write buffers from
the documentation of resetSocketLayer.
Added documentation to setSocketDescriptor
describing that read and write buffers are cleared.
Task-number: QTBUG-28914
Change-Id: I25a4b679708bdea0b259c50f1d10a3e9271dabb9
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
On windows (tested on win7) physicalSizeMM is changed after changing
screen resolution. We need to save new size.
Change-Id: I1b38d9ba2af9679812a973737a724c9a9c5395da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
A parent is required, otherwise the application gets deactivated when
the dialog closes. The same is done in Qt 4.
Task-number: QTBUG-36039
Change-Id: I56688b3259f1d207edd1bec499afd1365ae511dc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
- Use a separate widget for each test.
- Replace hard-coded timeouts by qWaitForWindowExposed.
- Center windows on screen.
Change-Id: I45ae306fd23348ee5dec3849e64ec98843e8bf32
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Changed MIPS DSP portion of the mkspecs/features/simd.prf file in order
to fix the corrupted build system for MIPS platforms.
List of the additionally optimized functions
from file src/gui/painting/qdrawhelper.cpp:
- qt_blend_rgb16_on_rgb16
- qt_fetchUntransformed_888
- qt_fetchUntransformed_444
- qt_fetchUntransformed_argb8565
from file src/gui/image/qimage.cpp:
- convert_ARGB_to_ARGB_PM_inplace
from file src/corelib/qstring.cpp:
- ucstrncmp
- toLatin1_helper
- fromLatin1_helper
Change-Id: I5c47a69784917eee29a8dbd2718828a390b27c93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We have it on function declarations and it gets a bit lost...
Change-Id: I19ba2e760f3714c26e78c3d8fd2570af3dcd136e
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Currently a QListView with wordwrapping activated will wrap the text
only to the width of the icon even if the grid size is bigger. With this
patch the option rect is now updated to match the grid size if valid
and the style uses it to determine the correct size when wrapping
[ChangeLog][QtWidgets][QTBUG-4714] Use the grid size for wordwrapping
when available in icon mode
Task-number: QTBUG-4714
Change-Id: I2cb63809d3ee8bd262f38bc11de91df9ff5cf237
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Avoid piping the test output to both the Windows system debugger, and
stdout. This fixes duplicate output in Qt Creator, which displays messages
from both sources.
[ChangeLog][QtTestLib] The (default) plain text logger on Windows now
logs to either the system debug log (in case no console is open), or
stdout, not both.
Task-number: QTBUG-34630
Change-Id: I35fe9f4a50cc660d79fad7dffa6d19659b2102ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This has been dead code in Qt 5 since WS_MAC isn't
defined any more.
The new implementation is far less intrusive and does
not require a separate layout.
Task-number: QTBUG-34411
Change-Id: I91bf2294086cb7334a0f56eb1bb97464d8d7b2e3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Comments contained some typos. Comments have been replaced with
the ‘official’ description from
http://msdn.microsoft.com/en-us/library/8x5x43k7.aspx.
Change-Id: I25dda0911735b4a0d4f306bc95bc984be0080e2f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QMainWindow::unifiedTitleAndToolBarOnMac() will
again return true, but the new implementation is
much more similar to the cross platform one so these
workarounds are not needed.
Task-number: QTBUG-34411
Change-Id: Ic95f491af94354776385dc984f1a00c64429a3f0
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fill the toolbar background with transparent
pixels to allow the view background to shine through.
Draw a separator line using HITheme.
Task-number: QTBUG-34411
Change-Id: I57732564a67a5a9d1eb7fd9038382b2b65be50a4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
It is possible to define the theme to use for android in the AndroidManifest.xml.
If it is defined in the activity qt itself should not overwrite it. The change uses
the defined style in case it is given in the AndroidManifest.xml.
This seems to fix also QTBUG-35151.
Task-number: QTBUG-35050
Change-Id: I8b55c02ca1ecd7baa5f2f9460d154095aacf015f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Smaller, rounder, darker toolbar handles. Works
especially well in unified toolbar mode.
Task-number: QTBUG-34411
Change-Id: I41eafdf0bb1dbbb4ed96d7bd799eb6f53bccbf7d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Allows moving the window by dragging the unified
title and toolbar area.
Task-number: QTBUG-34411
Change-Id: Idd85c0031895b5afd7dfdc8616e4452c47935af2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fix parsing of ISO Date from being totally lenient to being semi-strict
by requiring the separator positions to be non-numeric.
[ChangeLog][Important Behavior Changes] Parsing of Qt::ISODate by
QDate::fromString() and QDateTime()::fromString() is not as lenient as
before, the date component separators are now required to be
non-numeric. This means a string like "2000901901" will no longer be
recognized as a valid ISO Date, but "2000/01/01" will still be even
though it doesn't strictly meet the ISO format of "2000-01-01".
Task-number: QTBUG-34141
Change-Id: I0e481144136c60d4cac61364b9b2c1d2cd1e78fc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Explicitly check that the QTimeZone is valid before trying to use it.
Change-Id: Iec415a2cb07071502fe71ee5ac92a7657e818f99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Check day number falls in valid range before using as array index.
Change-Id: I8d7c203b97988633fe4c345d5e7002bba9c2c68b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>