The new QPageLayout methods weren't originally added to QPagePaintDevice
as no new virtuals can be added, instead static polymorphism was used to
add the methods directly in the derived classes QPdfWriter and QPrinter.
This however means that classes like QTextDocument with print() methods
that take a QPagedPaintDevice are unable to access the QPageLayout
methods. To fix this, instead make the QPagedPaintDevicePrivate a
virtual class and have QPdfWriter and QPrinter implement derived
private classes that are called by the non-virtual QPagedPaintDevice
base methods.
Change-Id: Ieb6e513b1fa05f5ae76ea1f9156b0b1a053089eb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This allows us to get the current value of the QMutex / QBasicMutex
after the testAndSet operation failed. It saves an extra load from
memory.
Change-Id: I4922a8b3df15e342b177b13f56cf4f1184314520
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Use the custom field QT_CATEGORY to store the name of the QLoggingCategory used
when writing to systemd's journal. To pass custom fields sd_journal_send() is
needed, and is used in combination with #define SD_JOURNAL_SUPPRESS_LOCATION to
store the metadata that is already in the QMessageLogContext.
Change-Id: I6a120701f7012aaa46451dd3d91586a419c5f803
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Use QWindow::devicePixelRatio() which is the most
accurate devicePixelRatio accessor since it can ask
the platform native window directly
Fall back to qApp->devicePixelRatio() if the window
pointer is not valid.
Task-number: QTBUG-37606
Task-number: QTBUG-38078
Change-Id: Ief1468a0c6ced07439f55329ab056883016241cc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QLibraryInfo::location() paths are relative to
"myapp.app/Contents/" when the application has a
bundle and relative to the executable when not.
However CFBundleGetMainBundle() can and will return
a valid CFBundleRef even if the application is built
as a standalone executable.
Add a test that verifies that the path constructed
with "/Contents" exists on disk. Fall back to the
non-bundle code path if it doesn't.
This bug was hit in cases where a qt.conf file was
present side-by-side with the app binary, for example
in qtbase/bin.
Task-number: QTBUG-38039
Change-Id: Id993599208fe94fff283c725778f8ad47b610ba7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Use zoom instead of performZoom: Does not beep if
there is no Zoom button, and is what Qt 4 did.
Task-number: QTBUG-37716
Change-Id: Iaa85d55a449744c38b260cf79745a433e0e3272f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Flush the individual rects that make up the region
instead of the bounding rect. This is required for
correctness since then areas not included in the
region might not have valid backing store content.
The bondingRect() usage here had its roots in an
optimization in Qt 4, where it was observed that
flushing the bounding rect was more efficient than
flushing (many) individual rects.
Task-number: QTBUG-37918
Change-Id: Ib805f6713523f9895be24c48466870efaaf89c02
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The QPlatformScreen::topLevelAt() default implementation
is flawed in that it does not check z-ordering but
simply returns the first window in the window list
that contains the test point.
Add QCocoaScreen::topLevelAt(). Use [NSApp orderedWindows]
to iterate through the window list in z order. Add
a NSWindow->QCococaWindow mapping hash to QCocoaIntegration
for getting the corresponding QWindow once a NSWindow
is found.
Task-number: QTBUG-37597
Change-Id: I7af70163a32528cb56f8d6caa037b98f580ee191
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Native Mac OS X apps uses Rtf as the rich text format
while Qt uses html. Add QMacPasteboardMimeRtfText
which supports converting from public.rtf to text/html
(but not the other way around, since we want to keep
posting our html as html).
The QMacInternalPasteboardMime API does not support
the concept of a one-way handler. Skip the Rtf handler
in QMacPasteboard::setMimeData().
Task-number: QTBUG-37188
Change-Id: Ibe29997a038bbb64da24b961e84a5f60133074e0
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
We can squeeze, but not by discarding elements. Make sure the size of
the object stays intact after changing the reserved capacity.
I've also added unit tests for other containers, just to be sure.
Task-number: QTBUG-37750
Change-Id: I5135b095943b7589423c51cebcb52af792468e61
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
No need to sprinkle the code with Q_ASSERT. We don't want this to fail
to the user anyway. By using a Q_STATIC_ASSERT, a failure will be
immediately reported to the developer.
This also solves a warning found by Clang 3.4:
error: unused variable 'pageSizesCount' [-Werror,-Wunused-const-variable]
Change-Id: I79cf72c64242ad395276ce4360c59ad81112d9eb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
It was inconsistent. This also solves a warning from Clang 3.4:
error: private field 'vmod_masks' is not used [-Werror,-Wunused-private-field]
Change-Id: I6be9f7ef56dffe6df2be3beb984c2d82d3808403
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
When a window is shown, libscreen will give it keyboard focus.
Requesting the activation right after the window is created (and
before libscreen activated the window) causes problems on some devices
e.g. Q10.
Change-Id: I29f7a38990ea4259a8b0c6624f70e31d7291af00
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Change on the image scaling functions did not update the neon function
declarations.
Task-number: QTBUG-35927
Change-Id: Ia1e7428953aa140cad36e1cf26a18bfefc2267e7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
fileFixify must not be called twice on the same file path, since it will
convert an absolute path from the shadow build to an absolute path in
the source dir. The first fileFixify occurs in MakefileGenerator::init,
along with the fixifying of INCLUDEPATH.
Change-Id: I607870573a80eaf834ea5f540bbe1451ec983114
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The code did discard the the data, so it wasn't affecting the comparison
result (tests added anyway), but it could cause crashes if the pointer
to the beginning of the data in the first 8 bytes of a page.
Change-Id: I618e68de329b65de34ef8c934934c3e631cc6c9f
Reported-By: Erik Verbruggen
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
It doesn't depends on windget for quite a long time already.
Change-Id: I251e2e0d52028d17a61c892308d099f344728e79
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
That #ifdef is placed before any include, so it has no effect.
Change-Id: I4bbf967bda720d287b363847669c5c7a22807bc4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Actually guarantee cursor doesn't move in this case for both logical
and visual modes (just what the documentation says we already do ;)
Change-Id: Iabdca7aa1d205672386a0095e3487e585611cdb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reserve the insertionPoints vector capacity prior to multiple append()-s.
Change-Id: I97ab5b2a1add9f2e87c04ad0707bf516c13ff4d7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
To guarantee proper positioning at the end of the last line in a
bidirectional text we have to insert the eol position into the
insertion points vector, accordingly to the visual ordering.
Detection of the last *logical* item in a *visual* line is unrelaed
to the text direction, it is simply `iterator.item == iterator.lastItem`.
[ChangeLog][QtGui][QTextLayout] Fixed visual cursor movement
in bidirectional text.
Task-number: QTBUG-18060 (partially related)
Change-Id: I53b6ab889ef580ab0560b620b808b1e09efc0fbd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
QTextLineItemIterator::next() was never updating itemStart and itemEnd
for QScriptAnalysis::TabOrObject, thus producing incorrect
insertion points for the line that contains tabs and/or objects.
Change-Id: Ia964c663cc0636ba6be4500702656f989b252fba
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Setup the GL context as shared with the Qt global share context.
Change-Id: I199cfc7d290466d0ad99294bcffcd738b615862b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Initialize directory delayed in shared code and add checks to verify
that it is valid. Close attached / cloned databases to prevent locks
on files and leaking temporary directories caused by SQLite:
QTemporaryDir: Unable to remove "...\Temp\tst_qsqldatabase-P1XkOA" most likely due to the presence of read-only files.
QTemporaryDir: Unable to remove "...\Temp\tst_qsqltablemodel-P1XkOA" most likely due to the presence of read-only files.
QWARN : tst_QSql::concurrentAccess() QTemporaryDir: Unable to remove "...\Temp\tst_qsql-l0VAKJ" most likely due to the presence of read-only files.
Change-Id: If85bbaed04bb1a32e427d642be332996d967f796
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Change b94493e revealed that in the lance script rendering, at the
surface_end command, cleaning up the fbo stuff and enabling the
ordinary painting again was done in the wrong order.
Change-Id: I358dafeffe95b25303fc2a8dc1d61384b2ca64fb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The current SDP uses CPUVARDIR variable to define whether x86 or
armle-v7 is used. Therefore, the whole structure uses these two
definitions to separate simulator and device builds. Renaming
qnx-armv7le-qcc to qnx-armle-v7-qcc allows to directly use CPUVARDIR
during Qt5 builds. For compatibility reasons the old folder is kept
and includes the new qmake.conf.
This change is similar to fe61f2d6b2
where we already aligned the BB10 mkspecs to the NDK structure.
Change-Id: I7e1c0c2d137dc4049549233940e7f9d1c9f671f0
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
In this scenario there is a widget with a button inside, and you click
the button with the tablet. The target of the event is the button,
but when you click it, the parent (or ancestor) is destroyed. Commit
2bac49265e took care of the case when
the parent is a window, but it is not always a window which is being
destroyed. So the approach of using a QPointer is better because it
should take care of all the cases when the qt_tablet_target is
destroyed during the course of a tablet event sequence.
Task-number: QTBUG-36848
Task-number: QTBUG-38040
Change-Id: Ia0e861f2cb2fbc30234aa596f3a36ddd0835a9af
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
One problem was that tests expect the top-level window to have a certain size,
which is not possible on BlackBerry. Another problem was that certain elements have a
dpi dependent size which the task250754_fontChange test did not consider.
Change-Id: I465ebe234a74d6150cdcbb7fc7e458a62155e0d0
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Using show() might result in showFullScreen() on some platforms,
so let's use setVisible(true) which has the same effect and seems
to be a more crossplatform solution.
Change-Id: I712584ace2adbe73b99e620a1ae5e88ff328fffb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
The "Creating an Android Application" tutorial was
adapted to also apply to iOS and renamed as
"Creating a Mobile Application". The page name (HTML)
was changed as well.
Change-Id: I445a258e21242b3c19b8fd83b35d24514ffc94cc
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
The "Fixed CE build of sqlite3" patch is preserved in this change.
(ea70ec8711)
Change-Id: I163a4bcc92f47838c8203d8f5d78bbdcb0c1fd84
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Some quick benchmarks against GNU coreutils 8.21 and OpenSSL 1.0.1e
(time in µs; time for coreutils and OpenSSL include the loading of the
executable):
Qt Coreutils OpenSSL
n SHA-1 SHA-224 SHA-512 SHA-1 SHA-224 SHA-512 SHA-1 SHA-224 SHA-512
0 0 0 0 717 716 700 2532 2553 2522
64k 120 484 381 927 1074 966 2618 2782 2694
Diff 120 484 381 210 358 266 86 229 172
The numbers for Qt are pretty stable and vary very little; the numbers
for the other two vary quite a bit, since they involve launching and
executing separate processes. We can take the lesson that we're in the
same ballpark for SHA-1 and we should investigate whether our SHA2
implementation is sufficiently optimized.
Change-Id: Ib081d002ed57c4f43741eca45ff5cd13b97b6276
Reviewed-by: Richard J. Moore <rich@kde.org>
"register" is usually ignored by the compiler and
is deprecated in C++11
[-Werror,-Wdeprecated-register]
Change-Id: I3a10f2128e4a4574b2cd3861bddbbd4ba6a3683f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This isn't needed anymore since quite a while.
Change-Id: I80a99f988a917af5b8c64865ec7e73e519978740
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
To enable windows xp support, we must do two things:
1. linker flag must be /SUBSYSTEM:CONSOLE,5.01 or
/SUBSYSTEM:WINDOWS,5.01. For x64, the version is 5.02.
2. Do not use Windows Kit 8. Win SDK v7.1A is recommended. Prepend the
right include paths and lib paths to INCLUDE and LIB before
building.
The Windows XP target support is enabled by passing "-target xp" to
configure.
Task-number: QTBUG-29939
Change-Id: I84c8439606cc2a9d27d64947702846faa4f1e4a2
Reviewed-by: Lucas Wang <wbsecg1@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
In a subsequent commit we will need access to more information of the
project object. This is merely a refactoring.
Change-Id: I40e501d037eb7d0295e1057e7b86e404e88e6ca3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>