Commit Graph

18472 Commits

Author SHA1 Message Date
Serge Lysenko
f807a6de2c Fix QImageReader::size() to return correct size for .ico files.
According to MSDN, the zero value of ICONDIRENTRY bHeight and bWidth
fields mean a maximum icon size 256 pixels. So QtIcoHandler::option()
should return 256 instead of 0 pixels for such icons. Also there is
fixed wrong seek offset at the second call on this method.

http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx

Task-number: QTBUG-48103
Change-Id: I99f0c9720fd58889045b0c73c51498f2065b0b91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-09-17 16:30:37 +00:00
Andy Shaw
d36a1dfb51 Serialize the capitalization value of QFont
By serializing the capitalization value of QFont, it ensures that it is
correctly preserved when QPicture streams it and later plays it back.

Subsequently the QDataStream version has been bumped up to account for the
change of the data format for serializing QFont.

[ChangeLog][QtGui][QFont] QFont now serializes the capitalization setting.
[ChangeLog][Important Behavior Changes] QDataStream version bumped up to
17 to account for changes in the serialization of QFont.

Task-number: QTBUG-15214
Change-Id: I042680760e5a69d18d41e786b7500a3eebbe562f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-09-15 13:30:09 +00:00
Christian Strømme
f8cc0164db Android: Always queue calls from Qt to Android.
Calling runOnUiThread() only queues calls that comes from a different
thread then the UI thread. The problem with the current solution is that
we can't promise or rely on the calls being delivered in the same order
they were called. Another consequence of the old behavior is that we
potentially cause long lasting synchronization points, which can cause
the application to become unresponsive or in worst case result in a
deadlock. With this change all calls to runAction() will be queued on
Android's main message queue (aka the UI thread) and return immediately.

Change-Id: I50a4273ae9ba8ad17fb2c50ccd57449e4fbc12f9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-09-15 13:23:57 +00:00
Aleix Pol
3601d6d7e3 Document QGuiApplication::primaryScreen property
It was just documented as a method and signal so far, even though it
already was a property. This patch merges both documentations into one.

Change-Id: I3fb4090b773ba8762ad9e830303812887b75add3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-15 13:17:10 +00:00
Aleix Pol
499f9b2abf Use the proper macro to detect the compiler as part of the NDK
The correct macros can be easily checked by running:
.../arm-linux-androideabi-gcc -E -dM - < /dev/null | grep -i ANDR
Otherwise we're just relying on the user to set up explicitly the
toolchain to target Android

Change-Id: I7b68521f43031c13da99b07626360d0702bff4ca
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-09-15 13:16:53 +00:00
Liang Qi
cebd5e2755 Fix QT_NO_ACCESSIBILITY build on windows
Change-Id: I30b9477596696e3f4b5b51f2d5b201fe4efbdef4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-15 13:14:04 +00:00
Erik Verbruggen
be55ecac61 Add a method to detect when the state-machine can exit.
According to the SCXML specification, the state-machine can exit the
interpreter loop when a final state has been reached. This happens after
finishing a macro-step or when it ends up in a final state right after
startup (e.g. when the only state is a final state). This patch adds a
virtual method which can be used to detect this reliably.

Change-Id: I594e952a4972dd70d4089a2c4ce1c86880568eb9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-15 13:05:49 +00:00
Tor Arne Vestbø
0e342fce4c Replace direct QPA access in tst_qguiappliction with testlib wrapper
Change-Id: I698aa9d7633992d257296759f5e04307ff0d8331
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-15 07:41:17 +00:00
Thiago Macieira
8888eae0d3 Merge two more QDBusConnectionPrivate members into a union
QDBusConnectionPrivate can only be a client or a server, not both, so
the DBusServer and DBusConnection pointers can be shared, like the
QDBusConnectionInterface and QDBusServer pointers in the other anonymous
union.

Change-Id: I9a75ad8521ae4e5cbbe5ffff13d1baa8ab83c42f
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:09:01 +00:00
Thiago Macieira
e94f512b1e Make sure we don't deadlock when connecting signals
This commit moves the code that finishes the signal-slot connection into
the QtDBus auxiliary thread. That is necessary because we're holding the
lock for writing while making blocking calls. The auxiliary thread might
be waiting for us to release that lock while processing some previous
message.

Change-Id: Iee8cbc07c4434ce9b560ffff13d0521b94a51833
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:57 +00:00
Thiago Macieira
e15e5b1d37 Bypass connectSignal() for receiving the NameOwnerChanged signal
This is an optimization but is required. Instead of going through the
entire (dis)connectSignal() stack to add/remove matching rules for the
NameOwnerChanged bus signal and call into our serviceOwnerChangedNoLock
slot, create a static hook that will match the signal and simply add/
remove the rules as needed.

The required part is that this avoids a recursion into connectSignal().
The next commit will move this code to the QtDBus manager thread and we
won't be able to call connectSignal() from there (it would create a
deadlock).

Change-Id: Iee8cbc07c4434ce9b560ffff13d074ce90ad02d4
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:55 +00:00
Thiago Macieira
cc5ab92cd9 Make QDBusConnectionPrivate::getNameOwnerNoCache work in our thread
In two commits, we will attempt to call this function from the manager
thread, so we need to be sure this function works from there. Right now,
it would deadlock in QDBusPendingCallPrivate::waitForFinished(), inside
QDBusConnectionPrivate::sendWithReply().

The solution is simple: expand sendWithReply to the sendWithReplyAsync
function it calls anyway, but tell the internal DBusPendingCall to
finish before we call waitForFinished().

Change-Id: Iee8cbc07c4434ce9b560ffff13d0749013d771ab
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:54 +00:00
Thiago Macieira
d8148edb23 Use the new QDBusConnectionPrivate::shouldWatchService function
That function was added in the previous commit, so deduplicate the code
from QDBusAbstractInterfacePrivate::initOwnerTracking().

Change-Id: Iee8cbc07c4434ce9b560ffff13d06f1d9fb0cde5
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:51 +00:00
Thiago Macieira
f744aece9d QDBusServiceWatcher: Move the logic to QDBusConnectionPrivate
With kdbus, we won't have a regular signal, but instead a special
message. So keep the logic of what to do in QDBusConnectionPrivate.

The #ifdef is to make sure the bootstrapped qdbuscpp2xml continues to
build in cross-compilation environments.

Change-Id: Iee8cbc07c4434ce9b560ffff13d06f0d9904cb6d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:50 +00:00
Thiago Macieira
186d881440 Remove the event callbacks in QDBusConnectionPrivate
They were used when we called the libdbus-1 message-sending functions
from any thread, which meant that the callbacks could be triggered on
any thread. Since we moved the message-sending to one thread only (the
manager's thread), there's no need for the event fallback anymore.

Since they're also always[*] running on an aux thread, there's no point
in checking for the presence of a QCoreApplication instance anymore. I
don't think there has been a need for this for many years, as the event
dispatcher has been decoupled from QCoreApplication for a long time.

[*] exception: the callbacks are first called in the thread that invoked
QDBusConnection::connectTo{Bus,Peer}, before we've done the
moveToThread.

Task-number: QTBUG-43585
Change-Id: Ic5d393bfd36e48a193fcffff13b73758c798d6b0
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:48 +00:00
Thiago Macieira
68964b1023 Merge two Q_GLOBAL_STATICS into another and solve memory leak
The two global statics for the session and system buses aren't necessary
if they can't outlive the global static for QDBusConnectionManager
anyway. So merge them there. The extra mutex is necessary because the
QDBusConnection::connectToBus function will lock the regular mutex.

This solves a potential memory leak at exit as a side-effect. Before
this change, the session and system QDBusConnection object got destroyed
in the main thread during global destruction, so it had to post an event
to the QDBusConnectionManager thread to finish the destruction of the
private. However, QCoreApplication is already gone by this point, so the
QEvent::DeferredDelete event never got delivered.

After this commit, there's no global static to destroy the
QDBusConnection (there is no QDBusConnection holding a reference), so
the object gets destroyed in QDBusConnectionManager::run()'s cleanup
code.

Change-Id: I9a75ad8521ae4e5cbbe5ffff13d1b967ee1a7a7e
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:47 +00:00
Thiago Macieira
ea01d7784a And move the creation of connections to the thread
Now we know that all timers and socket notifiers get created only in the
QDBusConnectionManager thread.

Incidentally, this reduced code duplication.

Change-Id: I27eaacb532114dd188c4ffff13d5075a8d2efb0b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:45 +00:00
Thiago Macieira
5d41a4aa5a And move the sending of other types of D-Bus messages to the thread
With this, we now know that all messages sent are sent from the same
thread. This simplifies greatly the handling of the socket.

Task-number: QTBUG-43585
Change-Id: Ic5d393bfd36e48a193fcffff13b73758087344ed
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:43 +00:00
Thiago Macieira
df7064c151 Move the sending of the D-Bus messages with reply to the thread
This is intended to simply the handling of the socket in the
future. Now, we know that all calls to send_with_reply are placed only
from the manager's thread.

Task-number: QTBUG-43585
Change-Id: Ic5d393bfd36e48a193fcffff13b737575c231927
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:41 +00:00
Thiago Macieira
6734c50a9e Remove superfluous code in QDBusConnectionPrivate::sendWithReply
No need to check for the local loop if that's the first thing
QDBusConnectionPrivate::sendWithReplyAsync will do. The side effect is
that this now allocates memory for the QDBusPendingCallPrivate object,
but loopback messages aren't that common to be worth the special casing.

Task-number: QTBUG-43585
Change-Id: Ic5d393bfd36e48a193fcffff13b73756ab802ba2
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:39 +00:00
Thiago Macieira
42858a9e88 Simplify some code in QDBusConnectionPrivate::sendWithReplyAsync
They're pretty much the same, clearly a copy & paste. Instead, merge the
two codepaths so that we don't run the risk of applying a change in one
part and forgetting the other.

Task-number: QTBUG-43585
Change-Id: Ic5d393bfd36e48a193fcffff13b737560f6753be
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:38 +00:00
Thiago Macieira
c2049f67e4 Use a dedicated thread for handling incoming libdbus-1 events
Each application will have one thread dedicated for this, for all
QDBusConnections. I wouldn't mind sharing such a thread with other uses
in Qt, provided none of them ever block (the QProcessManager thread
comes to mind, but it's going away soon).

The cost associated with this change in this commit is so far rather
minimal. All incoming D-Bus calls need to be handled after an event is
posted anyway, to avoid deadlocking on reentering libdbus-1 functions
that acquire locks still held. The cost is the one more thread running
and the cost of synchronizing them when an event is posted.

The benefits far outweigh that cost: no longer will we have problems of
QtDBus failing to run if the main system or session connections are used
before QCoreApplication is run. Moreover, events can be received and
handled in aux threads even if the main thread is blocked on some
operation.

Note: this commit may not be testable (tst_qdbusconnection may fail)

Task-number: QTBUG-43585
Change-Id: Ic5d393bfd36e48a193fcffff13b737556ccd11a8
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:36 +00:00
Thiago Macieira
939b7c630d Implement the blocking QtDBus call in terms of the non-blocking one
This simplifies the code a little by having a single code path. More
importantly, we no longer need to call the evil function
dbus_connection_send_with_reply_and_block. That function acquires a lock
on the socket transport inside libdbus-1, which means all threads need
to wait until the one call gets unblocked before they can continue.

To do that, this commit reimplements the QDBus::Block part of
QDBusConnectionPrivate::sendWithReply by reusing the existing call to
sendWithReplyAsync() and then doing a blocking-wait with
QDBusPendingCallPrivate::waitForFinished().

By using (Q)DBusPendingCall and the threaded connection approach (next
commit), now we never block on the socket. That also means the code to
call dbus_pending_call_block() is no longer necessary and the
waitForFinished() function itself can be considerably simplified.

As a side-effect of no longer blocking, a number of pre-existing race
conditions that used to be hidden showed up.

Note: this commit deadlocks without the threading (next commits).

Task-number: QTBUG-43585
Change-Id: Ic5d393bfd36e48a193fcffff13b73754954a3f7d
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:34 +00:00
Thiago Macieira
edaf7c30d4 Make QDBusConnectionPrivate::send return bool
It used to return the sent message's serial ID, but we never used that.
So simply use boolean instead.

Change-Id: Ic5d393bfd36e48a193fcffff13b73753ccf47759
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
2015-09-15 02:08:32 +00:00
Thiago Macieira
9af53bfc81 Use a signal for updating the dispatch status
The cost of connecting a signal may be a bit high, but it's comparable
to looking up the invokable method. However, QMetaMethod::invoke has a
higher cost than a signal-slot emission -- though in any case they're
both dwarfed by the cost of allocating the QMetaCallEvent and the
posting of it.

This is much more readable, though.

Change-Id: Iccecbecbe6288fb3b6d16578fdff3f203b6db29c
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
2015-09-15 02:08:31 +00:00
Thiago Macieira
1996bd4a01 Use QDBusConnectionPrivate* when QDBusServer receives a new connection
This is because the socket activity will move to a different thread;
QDBusConnectionPrivate* can be queued, QDBusConnection can't easily.

Change-Id: I82722016018b7fcfb246cda6043469fadbfd987d
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:29 +00:00
Thiago Macieira
2bcc913a7f Use QDBusServiceWatcher in QDBusAbstractInterface to track the owner
Instead of connecting to the "NameOwnerChanged" signal. This has better
performance, is simpler to implement and is future-proof: when we switch
to kdbus, there won't be a "NameOwnerChanged" signal to connect to. On
the drawback side, this will use slightly more memory.

Change-Id: I5801b8027949f041309567a493000fe7de9bf227
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
2015-09-15 02:08:27 +00:00
Thiago Macieira
2e12f6e63d Fix deadlock if the last reference is dropped during delivery
We increase the reference count of the connection during delivery of an
incoming message, so it's possible that the corresponding deref will
drop the last reference to the connection: another thread may have
called disconnectFromBus/Peer. However, during destruction we try to
drain the incoming socket queue, so we need to acquire the dispatch lock
again.

The solution is to always use deleteLater(), which means the
deleteYourself() function is unnecessary.

Change-Id: I27eaacb532114dd188c4ffff13d507039fcf7b6a
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-15 02:08:26 +00:00
Samuel Nevala
f3fd7b3d96 winrt: Move EGL surface to window.
Fixes GPU memory leak when window is created/deleted dynamically and
repeatedly. EGL context used to own EGL surface, but the context
outlives the surface if window is created/deleted dynamically. The
EGL surface is now owned by the window and destroyed with it.

Change-Id: Ib949261ef6e77217018e60aad3e36e4a6d2eaba0
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-14 19:20:02 +00:00
Kai Koehne
a8bc96e9e5 QAbstractSocket: Consolidate error reporting
Introduce the methods setError(), setErrorAndEmit() to consistently
set the internal error state.

Change-Id: I4ff951d100cf5e9f9a7e27135bb52188cde99853
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-14 09:38:24 +00:00
Ulf Hermann
65efeb6f9d QImage: Inline constScanLine call in pixel()
Calling constScanLine() is an extra function call, just for doing
"data + y * width". Also, we are checking d again, even though we
already know it's there.

The constScanLine() call is responsible for up to 15% of the total
CPU time spent in pixel().

Change-Id: Ia7a8e0a6d62fb257d1b22d91f062b66e9cfd349a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-09-14 09:30:09 +00:00
Samuel Nevala
6272e88296 winrt: Remove unnecessary assert from window.
Change-Id: I38593c63121e75e5d4a18e715d41c6ce5519e596
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-13 22:03:17 +00:00
Samuel Nevala
b3b1722d1f winrt: Fix capabilities query.
Windows Runtime port supports non-fullscreen and multiple windows.

Change-Id: I6f4791a7c329ece88e5f6f9910f3635a7bfef3f8
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-13 22:03:14 +00:00
Thiago Macieira
6de8c0aa09 Add a qt_version_tag symbol to QtCore that uses ELF versions
This symbol will exist with different ELF versions, allowing us to know
which version of Qt a given library or application was linked
against. When this symbol gets used, automatic packaging tools will
extract the dependency. The trick here is that the application uses
qt_version_tag without knowing which version is current, but the linker
resolves it to the current version and records that.

For example, if this were used with Qt 5.5, RPM's find-requires on an
application using QtCore would print:

  libQt5Core.so.5()(64bit)
  libQt5Core.so.5(Qt_5.5)(64bit)
  libQt5Core.so.5(Qt_5)(64bit)

Whereas find-provides on QtCore would print:

  libQt5Core.so.5()(64bit)
  libQt5Core.so.5(libQt5Core.so.5)(64bit)
  libQt5Core.so.5(Qt_5.0)(64bit)
  libQt5Core.so.5(Qt_5.1)(64bit)
  libQt5Core.so.5(Qt_5.2)(64bit)
  libQt5Core.so.5(Qt_5.3)(64bit)
  libQt5Core.so.5(Qt_5.4)(64bit)
  libQt5Core.so.5(Qt_5.5)(64bit)
  libQt5Core.so.5(Qt_5)(64bit)

Therefore, automatic dependency resolution would have the information it
needs to conclude that the application requires Qt >= 5.5.

Change-Id: I049a653beeb5454c9539ffff13e3fec9aeb50197
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-13 18:54:21 +00:00
Thiago Macieira
181c8d80d1 QNetworkInterface: get a friendlier (but not too friendly) name
Since Windows Vista, the OS keeps an extra set of names for each
interface, which are identifier-like and more friendly than previously,
but not the user-description.

For example:
  previous name: "{2B09D370-A032-4478-8444-495AD9301D67}"
  new name:      "wireless_6"
  friendly name: "Local Area Connection* 12"

Change-Id: I7de033f80b0e4431b7f1ffff13f995f983689f06
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-13 18:54:15 +00:00
Thiago Macieira
7bd6477682 Use the actual iphlpapi.dll and its headers
The has been present since Windows 2000 and most functions we need have
been present since Windows XP and Windows CE 5.0. There's no need to do
runtime detection anymore.

This was necessary in Qt 4.2, when this code was introduced, because we
still supported Windows 98 and Me, including Windows platform SDKs that
lacked the necessary header definitions.

Change-Id: I076d1e8bbd53469a24fad72cf58b1905e737f52a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-13 18:54:12 +00:00
Thiago Macieira
d878107001 Declare QNetworkAddressEntry and QNetworkInterface as metatypes
Change-Id: I7de033f80b0e4431b7f1ffff13f98c092ea3ba3e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-13 18:54:09 +00:00
Thiago Macieira
2187f0e7b0 Add a delimiter before "TracerPid"
Future-proofing against a future version of the Linux kernel adding a
"FooTracerPid:" before the TracerPid entry.

Change-Id: I42e7ef1a481840699a8dffff140347457902900f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-13 18:54:04 +00:00
Nobuaki Sukegawa
a0575a85b7 Fix typo in local variable name
Change-Id: I35f55f993274d9575a3906c1d553e7b04638efe3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-13 14:56:53 +00:00
Ulf Hermann
2e8bec9e4b QImage: Use d->height directly for checking dimensions on pixel()
Calling height() causes an additional function call and check for d
which sums up to more than 25% of the total CPU cost of pixel() if
the format is simple.

Change-Id: I449a3a17dc031e607e40dc1577a5553e7490de76
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-09-11 09:12:47 +00:00
Thiago Macieira
15b42af111 Change the CPU feature status word to be 64-bit instead of 32-bit
I'm going to need the extra bits for x86.

Change-Id: Ib306f8f647014b399b87ffff13f1d3d23e138518
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-09-11 09:08:31 +00:00
Topi Reinio
b2ca127ec4 qdoc: Allow linking to QML signals with their proper name
Trying to link to QML signal documentation failed when the link
string ends in parentheses:

    \l someSignal()

This commit fixes the issue by adding QML signals into the list
of primary functions, making it thereby available for
findFunctionNode() method.

Change-Id: Ib5a8325cd18171cdea392bcc1af676efe373f433
Task-number: QTBUG-48158
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-11 08:40:30 +00:00
Friedemann Kleint
a96c98fc61 Fix qdoc warnings of QRgba64.
qtbase/src/gui/painting/qrgba64.h:107: warning: No documentation for 'QRgba64::isOpaque()'
qtbase/src/gui/painting/qrgba64.h:112: warning: No documentation for 'QRgba64::isTransparent()'
qtbase/src/gui/painting/qrgba64.h:121: warning: No documentation for 'QRgba64::setAlpha()'
qtbase/src/gui/painting/qrgba64.h:119: warning: No documentation for 'QRgba64::setBlue()'
qtbase/src/gui/painting/qrgba64.h:118: warning: No documentation for 'QRgba64::setGreen()'
qtbase/src/gui/painting/qrgba64.h:117: warning: No documentation for 'QRgba64::setRed()'
qtbase/src/gui/painting/qrgba64.h:163: warning: No documentation for 'QRgba64::operator=()'

Change-Id: Ic6f6a8415b8ad33917e460737824fc8856776de1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-09-11 07:41:46 +00:00
Friedemann Kleint
47b3e7d130 Fix some doc warnings.
qtbase/src/gui/text/qzip.cpp:797:warn:Cannot find 'FileInfo::d' specified with '\variable' in any header file
qtbase/src/opengl/doc/src/qtopengl-index.qdoc:28:warn:Can't link to 'Qt Gui'
qtbase/src/opengl/doc/src/qtopengl-module.qdoc:28:warn:Can't link to 'Qt Gui'
qtbase/src/widgets/widgets/qcombobox.cpp:3033:warn:Cannot find base function for '\reimp' in showPopupFromMouseEvent()
qtbase/src/corelib/plugin/quuid.cpp:849: warning: Can't link to 'variant()'
qtbase/src/corelib/plugin/quuid.cpp:863: warning: Can't link to 'variant()'
qtbase/src/widgets/dialogs/qsidebar.cpp:72: warning: Cannot find base function for '\reimp' in mimeTypes()
qtbase/src/widgets/dialogs/qsidebar.cpp:80: warning: Cannot find base function for '\reimp' in flags()
qtbase/src/widgets/dialogs/qsidebar.cpp:98: warning: Cannot find base function for '\reimp' in mimeData()
qtbase/src/widgets/dialogs/qsidebar.cpp:134: warning: Cannot find base function for '\reimp' in dropMimeData()
qtbase/src/widgets/dialogs/qsidebar.cpp:151: warning: Cannot find base function for '\reimp' in setData()

Change-Id: I39d6494eb8179f0f7532f99458736fa5e30cdc25
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-09-11 07:41:39 +00:00
Liang Qi
053bd20079 Fix QT_NO_ACCESSIBILITY build on linux
Change-Id: Id9202b4ad84af0e94e59fafc3d56d8414fd5c43c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-09-11 07:37:09 +00:00
Liang Qi
a5fb312cd6 Fix QT_NO_ACCESSIBILITY build on OS X
Change-Id: Id8b41787fb9f50296ee9e0ad1f108418565d9325
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-09-11 07:37:06 +00:00
Tor Arne Vestbø
30335364a1 Update QPA handleExtendedKeyEvent to return the accepted state of the event
Change-Id: Ie85a4e987eb069d4dd0dbd39860f299a7204b585
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-10 22:56:22 +00:00
Tor Arne Vestbø
35793cea28 CoreText: Respect Qt::AA_Use96Dpi flag when creating CT fonts
The pixel size passed into QCoreTextFontDatabase::fontEngine() has already
been scaled to take the destination DPI into account. In the normal case
the destination DPI is the same as the screen's logical DPI, 72, and we
end up with the pixel size being equal to the point size. But when the
Qt::AA_Use96Dpi flag has been set, e.g. when running tests, the pixel
size is larger than the point size, and we need to pass this information
to CoreText, otherwise we end up with clipped text rendering. This was
evident when looking at the lancelot baselines for OS X, which are
produced using QTestLib, and hence run with Qt::AA_Use96Dpi set.

Change-Id: Ib0f720bb318b2dc437172a6b712675e3dfe3f7ac
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-09 17:18:34 +00:00
Tor Arne Vestbø
b253f404e8 iOS: Restore mirror mode using [UIScreen mainScreen] instead of nil
The latter had the same effect, but is an invalid assignment for a value
that is documented to be non-nil.

Change-Id: Ice00482138481556ad839bc3721e577dafcb26fe
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-09 17:18:32 +00:00
Tor Arne Vestbø
c22eceb7d0 Deduplicate some code in QWindowSystemInterface
66050f2a changed a few exported functions used by testlib so that they
sent events synchronously, by calling QGuiApp processWindowSystemEvent
directly.

The same effect can be achieved by setting setSynchronousWindowSystemEvents
to true before calling the normal QPA functions.

Change-Id: Id4c67f7d315a5607885c738ca54516434125b24e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-09 17:18:31 +00:00