Commit Graph

4438 Commits

Author SHA1 Message Date
Christian Strømme
2223cc8a2d Add function to get the actual PID from QProcess
It was not possible to get the actual process ID (in a cross-platform
manner) from QProcess, as the user would need to handle the returned
typedef (Q_PID) differently on Unix and Windows.

On Unix Q_PID is the actual process ID, but on Windows it's a pointer
to a PROCESS_INFORMATION structure, which among other fields contains
the process ID. Instead of returning a pointer on Windows,
QProcess::processId() will return the actual process ID on both Windows
and Unix.

[ChangeLog][QtCore][QProcess] Added processId() to QProcess. This
function will, unlike pid(), return the actual process identifier on
both Window and Unix.

Task-number: QTBUG-26136
Change-Id: I853ab721297e2dd9cda006666144179a9e25b73d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-14 00:34:25 +01:00
Thiago Macieira
8dcb72fd1e Add a CSV logging feature to the benchlib
This is only useful for logging benchmarks, since it won't print test
passes, failures, etc. It's useful for importing to spreadsheets to do
number-crunching.

[ChangeLog][QtTest]Added a CSV logging mode that is suitable for
importing benchmark results into spreadsheets. This can be enabled by
the -csv option on the command-line. The CSV logging mode will not print
test failures, debug messages, warnings, etc.

Change-Id: I245d6f86bb380645c9bc0d748cf474b3ed42cab8
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-02-14 00:34:25 +01:00
Laszlo Agocs
ff11af4fbc QOpenGLWidget and new-style compositing on eglfs
Integrate with QOpenGLTextureBlitter, QOpenGLWidget and friends.

Change-Id: Ic2867b713a21a3d2820d546174fc9164b3dd220c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-13 20:54:01 +01:00
Konstantin Ritt
7ac97d7efb Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-02-13 09:35:08 +01:00
Glen Mabey
4f23f0530a new QByteArrayList class
Initial submission of a new class QByteArrayList with the
purpose of aggregating and then joining QByteArray instances.

[ChangeLog][QtCore] Added new QByteArrayList class.

Change-Id: I2a9dc71ff7aadb19ebc129a0d47ac8cd33895924
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-12 20:12:17 +01:00
David Faure
f42bd772f8 Move setWindowIcon() up to QGuiApplication.
[ChangeLog][QtGui][QWindow]QWindow::icon() now defaults to the application
icon, which can be set with QGuiApplication::setWindowIcon().

Change-Id: Id1974e5cda81775e515c14b294f67fb99351c6c9
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-12 20:12:17 +01:00
David Faure
bf82245baf Restore support for -title command line argument on X11, add -qwindowtitle.
-title disappeared between Qt4 and Qt5, due to all the refactorings around QPA.
Making the caption of the mainwindow configurable allows custom setups
for specific users or use cases.

[ChangeLog][QtGui][QGuiApplication] Restore support for -title command line
argument on X11, add -qwindowtitle on all platforms.

Change-Id: I73e6bf21248f3419178eba583b257172a175e74e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-12 20:12:17 +01:00
Paul Olav Tvete
eacd58d4e7 Enabling QQuickWidget and QOpenGLWidget
Enable child widgets (without a native window) that render to an FBO
and are composed with the raster backingstore by the platform plugin.
A preliminary version of QOpenGLWidget is included as private API.

Change-Id: I8f984a4d7db285069ce3d6564707942c823d890d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-02-12 20:12:17 +01:00
Friedemann Kleint
5ae5bebb93 Added function returning build information to QLibraryInfo.
Useful for bug reports and test logs.

[ChangeLog][QtCore] QLibraryInfo provides information on how
Qt was built.

Change-Id: I867197fd7d2e10bcdf01a8eb47c9c1e03647e2c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-12 17:24:33 +01:00
Frederik Gladhorn
a9c88c1f39 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/gui/image/qimage.cpp
	src/gui/text/qtextengine.cpp
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/printsupport/kernel/qprintengine_win.cpp

Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
2014-02-12 16:28:07 +01:00
J-P Nurmi
4d6cb199b8 Make QToolButtonPrivate::popupTimerDone() more robust
Avoid dereferencing the q-pointer if the button has been
destructed meanwhile popup was open.

Task-number: QTBUG-26956
Change-Id: I68190e9fe84c669229ae0ce4d573ee7a02a8a141
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2014-02-12 01:41:15 +01:00
Kai Koehne
a2bfd11493 Allow configuration of logging rules from file system
Allow configuration of logging rules from outside of the application,
either through a configuration file (.config/QtProject/qtlogging.ini),
or through a file specified by a QT_LOGGING_CONF environment
variable.

The logging rules from the different sources are concatenated: First
the rules from QtProject/qtlogging.ini are applied, then
QLoggingCategory::setLoggingRules(), finally from the environment.
This allows an application to overwrite/augment the system wide rules,
and in turn that can be tailored for a specific run by setting a
configuration in the environment variable.

[ChangeLog][QtCore][Logging] The logging framework can now be configured
with an .ini file.

Change-Id: I442efde1b7e0a2ebe135c6f6e0a4b656483fe4b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-11 20:59:15 +01:00
Peter Hartmann
c5042d68ea network tests: do not rely on external servers
They cause test failures from time to time.

Change-Id: I917bef340401d25bf54e133be9d9562b3b133c9f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-02-11 16:03:02 +01:00
Peter Hartmann
42cfb5fe4d SSL: add support for the Next Protocol Negotiation extension
... which is needed to negotiate the SPDY protocol.

[ChangeLog][QtNetwork][QSslConfiguration] Added support for the Next
Protocol Negotiation (NPN) TLS extension.

Task-number: QTBUG-33208

Change-Id: I3c945f9b7e2d2ffb0814bfdd3e87de1dae6c20ef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-02-11 15:37:10 +01:00
Frederik Gladhorn
df62c31807 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-02-11 15:12:00 +01:00
Joerg Bornemann
cbc6387a28 support c'tor as second parameter in foreach macro
Passing a constructor as second argument to foreach didn't work when
building with gcc.
For MSVC this already worked as a different foreach implementation is
used.

Change-Id: Id98444c699b4cebc14ea62076c5f7cba33ffb824
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-11 13:28:35 +01:00
Allan Sandfeld Jensen
15f3191981 Fix drawing vertical gradients in RGBA8888 formats
The RGBA8888 formats was incorrectly using the qt_gradient_quint32
which is argb specific. This caused vertical gradients but only
vertical gradients to be drawn incorrectly.

This changes the RGBA8888 formats formats to use the generic gradient
method and renames qt_gradient_quint32 to qt_gradient_argb32 to
indicate its limitation.

Change-Id: Ia1cd48ca7f4f78b64f31d6263e81cd8ac3b0954e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-10 23:02:47 +01:00
Giorgos Tsiapaliokas
d61e774307 Print qCDebugs in arbitrary categories by default
The debug output of all categories will be visible by default,
except from the "qt.*" categories. "qt.*" categories are private
and their default debug output will be hidden.

[ChangeLog][QtCore][Logging] Enable qCDebug's for all categories except qt one's

Change-Id: Ibe147c8bbe0835a63b3de782288b9c3251321d8f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-10 16:28:30 +01:00
Jorgen Lind
a80253ae4c QOpenGLTextureBlitter
private api, but useful for 2d gui code that suddenly finds itself
needing to get a set of textures onto some fbo

I didn't want to include ARB_copy_image since it looks like its from
texture/renderbuffer -> texture/renderbuffer while this class implies
texture -> write fbo. We could wrap ARB_copy_image in QOpenGLTexture or
some other class or we can add it later.

I have not added any QOpenGLTexture functions since this class opperates
on the GLuint identifier. We can add overloads later.

Change-Id: I3e565b33466c1c183a249a33c3e82c6786debd55
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-10 12:49:06 +01:00
David Faure
5c9d671bfb QStandardPaths: fix empty path in XDG_DATA_DIRS being treated as '/'.
The basedir xdg spec says:
"All paths set in these environment variables must be absolute.
If an implementation encounters a relative path in any of these variables it
should consider the path invalid and ignore it."
Therefore we ignore relative paths including the empty string.

Change-Id: I8f779b78981018051b16de23b2514f2e62b7ab39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-10 11:00:41 +01:00
Thomas McGuire
6f5db32abe Don't deadlock when deleting slot objects in QMetaObject::activate()
The slot object was deleted after the mutex was relocked, which caused
a deadlock in case the functor destructor locked the same mutex again.

Change-Id: I5b4fb22fdb4483f91c89915872bfd548c31b0eea
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-02-08 14:32:53 +01:00
David Faure
3e8af132df QStandardPaths: ensure that paths use '/' on all platforms, as the comment said
Change-Id: Id70b5e92c07f63e71e7a1a8fb229f927d352ebdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-08 10:50:25 +01:00
Morten Johan Sørvig
c8848a5e98 Compile.
Change-Id: Ib0e7e7aa2964835afda4055a5fe76abbd5db84e3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-08 10:43:58 +01:00
Jan Arve Saether
de1b98e9c1 Fallback to QWidget::grab() if QScreen::grabWindow() fails.
QScreen::grabWindow() is not always reliable because it grabs from the
framebuffer. (The window might then be covered by other windows, e.g.
"Stays on top"-Windows, popups etc).
If QScreen::grabWindow() fails we therefore fallback to
QWidget::grab(). This will not grab from the frame buffer, but it will
ask the widget to render itself (with its current state) to a pixmap
and return it.
QWidget::grab() should usually return the expected pixmap, and the
pixmap it gives is not subject to the state of the window manager.

This means that both QScreen::grabWindow() *and* QWidget::grab()
must produce an unexpected pixmap in order for the test to fail.

Change-Id: I276554155bb1e5b510d2a2d43628d91669464fe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-07 23:52:49 +01:00
Giuseppe D'Angelo
bcd1b7fe8e Fix QString::toUcs4 returning invalid data when encountering stray surrogates
Code units 0xD800 .. 0xDFFF are not UCS-4, so we can't happily return them.
Instead, if we encounter a stray surrogate, replace it with 0xFFFD, which
is what Unicode recommends anyhow.

References:

§3.9 Unicode Encoding Forms

    D76: Unicode scalar value: Any Unicode code point except high-surrogate
    and low surrogate code points.

    As a result of this definition, the set of Unicode scalar values consists
    of the ranges 0 to D7FF_16 and E000_16 to 10FFFF_16, inclusive.

    [...]

    UTF-32 encoding form: The Unicode encoding form that assigns each Unicode
    scalar value to a single unsigned 32-bit code unit with the same numeric
    value as the Unicode scalar value.

§ C.2 Encoding Forms in ISO/IEC 10646

    UCS-4. UCS-4 stands for “Universal Character Set coded in 4 octets.” It is
    now treated simply as a synonym for UTF-32, and is considered the canonical
    form for representation of characters in 10646.

§ 3.9 Unicode Encoding Forms (Best Practices for Using U+FFFD)
and
§ 5.22 Best Practice for U+FFFD Substitution

    Whenever an unconvertible offset is reached during conversion of a code
    unit sequence:

    1. The maximal subpart at that offset should be replaced by a single
    U+FFFD.

    2. The conversion should proceed at the offset immediately after the
    maximal subpart.

    [...]

    Whenever an unconvertible offset is reached during conversion of a code
    unit sequence to Unicode:

    1. Find the longest code unit sequence that is the initial subsequence of
    some sequence that could be converted. If there is such a sequence, replace
    it with a single U+FFFD; otherwise replace a single code unit with a single
    U+FFFD.

    2. The conversion should proceed at the offset immediately after the
    subsequence which has been replaced.

[ChangeLog][QtCore][QString] QString::toUcs4 now does not return invalid
UCS-4 code units belonging to the surrogate range (U+D800 to U+DFFF)
when the QString contains malformed UTF-16 data. Instead, U+FFFD
is returned in place of the malformed subsequence.

Change-Id: I19d7af03e749fea680fd5d9635439bc9d56558a9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-07 15:00:36 +01:00
Frederik Gladhorn
a1fe728fa5 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/gui/kernel/qguiapplication.cpp
	src/plugins/platforms/android/androidjnimain.cpp
	src/plugins/platforms/android/qandroidplatformintegration.cpp
	src/plugins/platforms/android/qandroidplatformintegration.h
	src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/sql/doc/src/sql-driver.qdoc
	src/widgets/widgets/qtoolbararealayout.cpp

Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
2014-02-07 13:07:25 +01:00
Thiago Macieira
125bb81bef Fix compilation after b0afad8f0b
That commit made QString::toXxx (8-bit) functions use C++11 ref
qualifiers, so we need to match it here.

Change-Id: I45b50464d36f858d012b12e0cb511aae347ddb6f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-02-07 04:47:12 +01:00
Giuseppe D'Angelo
8cbe52d581 Long live QStringIterator!
UCS-4 iterator over a QString.
Kept private for now so we can still work on the API.

Done-with: Thiago
Change-Id: I377f8bb1921e591ee3292c08c3e097fb6bc7f0c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-07 04:47:04 +01:00
Thiago Macieira
b2d5e7805a Add QString::fromUtf16 with char16_t and fromUcs4 with char32_t
Because they make sense. I'm even thinking that the char16_t version
should get a QString implicit constructor. Maybe both encodings.

Change-Id: Ifffc61dd890795fbbbd5f7cb5efb3e6287d1270e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-07 04:47:04 +01:00
Gabriel de Dietrich
b1714aec51 Cocoa: Allow frameless NSWindow child QWindows
Showing, moving and resizing

Contrarily to what an NSWindow does to its NSViews, child NSWindows need
to be explicitly shown and hidden, and clipped if the parent NSWindow
changes geometry. Also, hiding an NSWindow will not hide its child
windows. This needed to be managed manually, adding 2 additional states
to QCocoaWindow to reflect whether a child window has been clipped out by
any ancestor geometry change, or hidden by any ancestor being hid. Also,
ordering out an NSWindow will remove it fromm its parent's child windows
array, making necessary to maintain a parallel list of child windows in
QCocoaWindow.

Stack order

Although child NSWindows can be ordered relatively to each other, they
need to be added again to be moved lower in the window stack. This also
means the windows above it need to be added on top.

Key (focus) status

One of the remaining issues, is to make sure the top level window keeps
the "key status" while still forwarding key events to the child window.

Keeping same event propagation

This use case is best illustrated with undocking QDockWidgets (if these
are child NSWindows). The main issue is to make sure the QDockArea will
get the mouse events right after undocking a dock widget. We used a similar
workaround as the "key status" problem, and manually forward the mouse
events to the dock area's QWindow.

Manual test, by Morten Johan Sørvig, included.

Task-number: QTBUG-33082
Task-number: QTBUG-22815
Change-Id: I50e34936fb82bff013e99f4bcb3bd0db0704c6ae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-05 23:12:50 +01:00
J-P Nurmi
65bd80ebfc QTabWidget: fix moving of the current tab
Task-number: QTBUG-36455
Change-Id: I38687283d60fe38a4b586b064d5ddd4ed3be06b6
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@me.com>
2014-02-05 23:04:04 +01:00
John Layt
75aef26c27 QPageSetupDialog - Add manual dialog test
Add QPageSetupDialog to the manual dialog test.

Change-Id: I5a7a4fedf1fe3ba074891eaed84efaa1c173e620
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:34:10 +01:00
John Layt
5af95d077b QPrinter - Fix Printer Selection option on Windows
Make the printer selection option api public on Windows to be
consistent with Mac, and with the print program api which is already
public.

Change-Id: I3da9684288348eaa43276ca8534a1d5809f7027b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:34:03 +01:00
John Layt
27c33a8f7a QPrintEngne - Fix PPK_Creator
Add support to the Mac and Windows print engines to preserve the
creator name when switching between native and pdf format.

Change-Id: Ie036af3140f24d8e34aa886f091384f93aa0157b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:33:59 +01:00
John Layt
0ee72b09fd QPrintEngine - Fix PPK_CollateCopies
Mac supports Collate Copies using native api, so add support.  Note
this is mostly only useful for setting the print dialog default, as
Mac supports server-side multiple copies so the app will never need to
collate the copies itself.

Change PDF and Windows to default to collate true to match Mac as this
is the behavior users expect.

Task-number: QTBUG-27724
Task-number: QTBUG-35251
Task-number: QTBUG-22144

Change-Id: Ia43dbc260b3a71aa5b267cca54c168ffbea794fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:33:54 +01:00
John Layt
27473f19bb QPrintEngine - Fix PPK_DocumentName
Add support to the Mac print engine for set/get the Document Name using
the Job Name setting. Our documentation states this is one use that the
document name will be put to so is appropriate to be used.

Change the Windows print engine to default to a blank Docuemnt Name
consistent with the other print engines. If still blank when printing
then use a default value.

Task-number: QTBUG-27724
Task-number: QTBUG-22144

Change-Id: If590811b5720e6f759eabc290b578b94e221f9f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:33:50 +01:00
John Layt
053bee8b80 QPrinter - Clean up Print Engine Key defaults and tests
The PrintEngine keys are not consistently treated across the platforms
and are not properly tested.  Start the process of making the print
engines behave consistently by documenting and testing the current
behavior. Ensure all unsupported features return a consistent
default value.

The auto test for valuePreservation() has been flaky depending on the
platform and installed printers so remove it and replace it with more
complete testing.  If no native printers available then don't test
the native engines.

Fixes for the individual inconsistent keys will follow.

Task-number: QTBUG-26430

Change-Id: Iab914d7e0a5ae4a2cdc24c8645751f0910cf440c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:33:42 +01:00
Eskil Abrahamsen Blomfeldt
35579f6fe7 Support empty inline elements in block tags in QTextDocument
This fixes the following case:

<blockquote>
<span />Foobar
</blockquote>

Qt would see the end of <span>, and consider the current block
tag as closed, thus resetting the block format, thus losing the
margin set for the current block (due to blockquote).

If you do

<blockquote>
<span>Foo</span>Foobar
</blockquote>

instead, then the same would not happen, since hasBlock is set
to false when we append text to the current inline node.

[ChangeLog][QTextDocument] Add support for empty inline elements
in block tags.

Task-number: QTBUG-33336
Change-Id: Ic566edfec96cb8d44d1c02932bb195bc921d1580
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-05 09:10:25 +01:00
Andy Shaw
060b853a2f Actually print when the tester pushes the print button
Change-Id: I5c995938a74f720be5beb33160488ec1ec73c0ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-05 08:51:55 +01:00
Jake Petroules
fdef360bad QFileSelector: correct the macros for Apple platforms.
This fixes a serious regression from
7d72516b52.

[ChangeLog] QFileSelector: the identifier for OS X has been changed back
to 'osx' from 'mac', and 'mac' and 'darwin' have now been added as
selectors for Darwin OS (which is the base of both OS X and iOS).

Task-number: QTBUG-35073
Change-Id: I83183e34c5a697338cc1ddcac33a41bd379ded12
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2014-02-04 19:36:58 +01:00
Nils Jeisecke
6894bc0f3f Fix sorted QSortFilterProxyModel filter update
When changing a filter so that a previously empty proxy model becomes
populated sorting was not applied correctly.

This was caused by using mapToSource for getting source_sort_column
from proxy_sort_column. For an empty proxy model this won't work because
no valid proxy index can be created in this case.

We now directly use the root index column mapping instead by doing
essentially the same as QSortFilterProxyModelPrivate::proxy_to_source
but without the sanity checks needed for external use.

The sorting feature of QSortFilterProxyModel has always assumed that
the number of columns is specified by columnCount(QModelIndex()) so
the behavior doesn't change.

[ChangeLog][QtCore][QSortFilterProxyModel] Fixed sorting when a
previously empty proxy model becomes populated because of a change in
the filter.

Task-number: QTBUG-30662
Change-Id: I21322122e127889dfadc02f838f0119ed322dcab
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-03 22:12:20 +01:00
Bastiaan Veelo
5e99b07a07 Fix setWindowFlags() for QMdiSubWindow.
It was impossible to hide/show the close button after a QMdiSubWindow
was created.

Task-number: QTBUG-9933
Task-number: QTBUG-27274

[ChangeLog][QtWidgets][QMdiSubWindow] Fixed setWindowFlags() for QMdiSubWindow.

Change-Id: I7db9a1bef5ba8a8ace729acb85682c8b3de9c33c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-01 15:50:26 +01:00
Christian Loose
f40c28f915 Q(Plain)TextEdit: Add find() overload with QRegExp
Add overloads to the find() methods in QPlainTextEdit and QTextEdit
that find the next occurrence matching the passed regular expression.

These are convenience methods that eliminate the need to use the
document() method and the need to handle the QTextCursor return value.

[ChangeLog][QtWidgets][QPlainTextEdit] Added find method overload using QRegExp

[ChangeLog][QtWidgets][QTextEdit] Added find method overload using QRegExp

Change-Id: Ia6139b771e3ae4ca02e4b8ea7fde19e5dc71b9d8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-01-31 21:51:35 +01:00
Friedemann Kleint
62a3aaf3f1 Fix MSVC-warning about unused variable eventdispatcher.
Change-Id: Ic7c12f16c310cc681bba39a7969de235afcf0f44
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-31 10:21:50 +01:00
Allan Sandfeld Jensen
5f59207bd3 Optimize drawing to and from generic formats
When drawing to and from the less common formats most of the cpu time
is spend in conversion. The conversion method is rather slow due to
using variable shifts and masks that the compiler does not have a chance
to optimize.

This patch changes the conversion methods to being templates fed by
constexpr methods. This allows the compiler to fully optimize the methods
yielding 2x->5x speedups.

The reliance on constexpr however means the optimized methods are only
used under C++11.

Change-Id: I2ec77c4c1c03f12ee463a694a2b59db0f0b52db1
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-31 00:24:48 +01:00
Konstantin Ritt
f26928cccf Allow QTextCharFormat::setFont() to skip unresolved font props
This makes the font merging possible and solves an issue
with the default font properties inheritance when used
in conjunction with QTextFormatCollection.

Change-Id: If8b543c011122dde9f086f5d696df3b042f7b90c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 00:24:48 +01:00
Friedemann Kleint
f6723cf0d4 tst_qpauseanimation: Fix condition in QEXPECT_FAIL.
introduced by  b0b22e8d49 .

Change-Id: Ia57331ce9373a414f2bc56962412f20ef83bd7ca
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-30 22:10:22 +01:00
Thiago Macieira
aba30f0234 Replace the type-based QAtomicIntegerTraits with a size-based one
This simplifies the code a lot and avoids silly mistakes where a
specific integer type is missing (such as char16_t).

Change-Id: Id91dfd1919e783e0a9af7bfa093ca560a01b22d1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-30 18:06:27 +01:00
Friedemann Kleint
1cc0a18d79 Revert "test: marked tst_qlocale as insignificant on Windows"
This reverts commit b7486591cd.

Conflicts:

	tests/auto/corelib/tools/qlocale/test/test.pro

Task-number: QTBUG-25284
Task-number: QTBUG-36306
Change-Id: If4a335c114302f7af999d7a254e1aa55b2df7176
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-30 18:04:59 +01:00
Konstantin Ritt
a5614264d5 Get rid of QGlyphLayout::advances_y
...and thus consume 4 bytes less per glyph and increase the performance a bit.
It seems, the only CTFontGetAdvancesForGlyphs() returns both x and y
advances, though y advances are always equal to 0 for horizontal
orientation and x advances are always equal to 0 for vertical orientation.

Also, rename `advances_x` to `advances` for consistency
and declare QGlyphLayout's data size in a single place.

Change-Id: I56b20f893f8a6feb7aa870e3edbca99dd93ba2e2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-30 12:43:33 +01:00