QMetaObject::connectSlotsByName(QObject* o) creates a list of all
children to look for signals that match slots of o. This changeset
simply adds the object o itself to that list.
The motivation is to finally fix the long standing QtCreator bug
QTCREATORBUG-6494. Where executing 'Go to slot...' and choosing
'accepted()' for a simple QDialog named 'MyDialog' will add a
on_MyDialog_accepted() slot to MyDialog. That slot never gets
connected. More details may be found in the linked QTBUG-7595.
Task-number: QTBUG-7595
Task-number: QTCREATORBUG-6494
Change-Id: I35f52761791af697eabb569adb5faee6fae50638
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Since we currently implement only half of the XEMBED protocol (we lack
the container part), we use a simple XEMBED container built with Gtk+
and PyObject. Using an interpreted language as Python helps us avoiding
a build dependency on Gtk+.
Change-Id: Ibc6282371c6f767e481c8a8ba2b5ca9cdd0d8b82
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
In case somebody uses QVector as a stack, it is not fair to have
takeLast, removeLast and pop_back to do way too much work.
This is still very slow compared to std::vector::pop_back
(mostly due implicit sharing), however it is more than a
factor faster than before.
Change-Id: I636872675e80c8ca0c8ebc94b04f587a2dcd6d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds takeFirst and takeLast which are functions
that QList also has.
Change-Id: I761f90b529774edc8fa96e07c6fcf76226123b20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds the functions removeFirst() and removeLast().
Functions that QList has.
Beside making these functions, pop_back and pop_front are
redirected to these rather than calling erase.
Change-Id: Ifc5f8a78e33f436f06f21095a920ec5d4311fd6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Five attributes are supported, matching what the perf(1) tool
supports. The 'p' attribute (precise IP reporting) wasn't added
because we don't do assembly-level debugging with benchlib.
Change-Id: I726f735a5bcc0c97e62cde0fbe0843597068ad7c
Reviewed-by: Jason McDonald <macadder1@gmail.com>
This will allow us to modify more attributes from the command-line
Change-Id: I84d4933cbfa2b69c4e1009eaf3e005cfc3e7e01c
Reviewed-by: Jason McDonald <macadder1@gmail.com>
This adds support for checking cache accesses and misses, per
operation (read, write and prefetch) as well as per cache level (L1
for data, L1 for instructions, last level).
The branch prediction unit (BPU) is also accessed via the cache
monitor subsystem.
Change-Id: I8fa96b141cc777c9d231bd57fa36bca33ae7bdfd
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Added support for most hardware and software counters available on
Linux 3.3. The cache-based counters are missing because they need
special handling.
Also added an option that lists available counters. Note that the list
is of counters the library knows about, not the counters that the
hardware can measure.
Change-Id: I9f6fb09b5460bf4ac6082081611c1d6ff806a3fa
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Currently, we only support one event type: counting CPU cycles with
hardware counters. There are no fallbacks if this hardware counter is
not available, and there is currently no way to specify other
counters.
Benchlib only supports reporting one event per benchmark, even though
the event counter interface allows specifying more than one. Still,
the hardware usually has limitations on how many events it can monitor
at a time, and we'd prefer to have the counter running at 100% of the
time, so this will not change.
Change-Id: I79858a3ad1e696dc4b7b72c420e5a04b67cd55de
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Currently, it only prints "perf available" if you use the -perf option
and perf is available. The implementation comes in the next commits.
Change-Id: Ic6cdee70e21df25780799a4bc31ca2c2d923b9f8
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Imported from linux's own git, at v3.7:include/uapi/linux/perf_event.h
(blob SHA-1 is 4f63c05d27).
We cannot rely on the file being shipped by distributions. Older
versions did not have all fields in the perf_event_attr structure. If
those bits are enabled at runtime, the kernel will simply reject the
perf_open call (-EINVAL). Currently, this can only happen with the
non-default options exclude_guest and exclude_host.
Change-Id: Ib329e52c21d6969406da0cf33de823d721d94206
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QKeySequence provides conversion to and from strings. But a similar
convenience was missing for QList<QKeySequence>. It would come in handy
when you want for instance to save/restore the shortcuts of a QAction.
Change-Id: I9e4f2001c58a595392a5019a57c564992c39bf88
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
I changed the existing test-case code to make it more scalable
in terms of adding more connectSlotsByName related tests. The
old "manual list of ints"-method was really not developer friendly.
This is a preparation for a subsequent modification of
connectSlotsByName behavior.
Change-Id: Ib760e52631ce4b5ae2a3ebdb4854849ff6c93bfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Introduce function to retrieve HDC with transformation.
Paint Vista-style items at correct location when used
as a child widget (for example, in Qt Designer).
Disable special drawing that works only for top-levels.
Task-number: QTBUG-29904
Change-Id: Ic902fd30e8050317b24ab7f7e2757ef1e16407f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
If no window exists at the time QWizard::setWizardStyle() is
set, further delay initialization of the Aero style until show().
If the wizard is a child window, just adapt the geometry.
Task-number: QTBUG-29904
Change-Id: I3805331ae726a0aa2020815d5bff571ca407efbc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
We cannot access children directly, since that won't ensure that
the pending sort is executed. However, the functions we need are
there already and actually makes the code nicer.
Task-number: QTBUG-29903
Change-Id: I6899284275dd79b991896a5f08486b58d95f819d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
There is some code duplication between QMacStyle anf the Cocoa QPA
plugin regarding painting and bridging with Cocoa.
Task-number: QTBUG-29725
Change-Id: I347407a9bca47b6fccd77fb924688bd35135d96b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
qdevice.pri is not target/host specific yet, so we were loading
it and overriding QMAKE_MAC_SDK to iphonesimulator eg., even
for host tools such as moc.
Change-Id: I10277e60e1da84dda239e32a6f19b40dc48f084a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
d28073d9 creates a distinction between "mac" and
"macx". The latter is not set on iOS, which caused
MakefileGenerator::target_mode to be set to TARG_UNIX_MODE.
Check for the "mac" active config instead of "macx".
Rename TARG_MACX_MODE -> TARG_MAC_MODE.
Change-Id: I7192788c33f5723034ba76da2492379dd454f0ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
d28073d9 enables the Mac style on all "mac" platforms,
including iOS where it does not compile.
Disable the mac style on all platforms except
"macx" (Mac OS X).
Change-Id: I67685f745b1a0910b05794cddeaf27cdaa31cbfd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
We want the second member from 'Xcode 4.x', and $$first() gave us
'Xcode' instead of the version number.
Change-Id: Iaf0ed9dc89a03f7918290a61bddade82651ad0f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add a static QWindow::fromWinId(WId id) constructor which can be used to
create a QWindow object representing windows created by other processes.
Then, QWindow::setParent() can be used to embed a window into a foreign
window socket and QWindow::setTransientParent() to stick the current
window on top of a foreign window.
The changes in the QtWidgets module ensure that the focus chain (TAB
navigation) correctly works when a QtWidgets-based window is embedded
into another application.
As far as the platform implementation is concerned, this commit only
implements the embedding functionality in the XCB plugin. So, this is
roughly equivalent to the Qt4 QX11EmbedWidget functionality.
Change-Id: Iff8f7b9ee974d33fb30f36056f7838b433a413c7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This provides a fast multiInsert in QMap (and a fast insert in
QMultiMap) when providing a correct hint.
Change-Id: I3c864c3a7842765fe63f8ecb4b54d0e8c9fd22d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This adds a fast insert on QMap when providing a correct hint.
Change-Id: I256bba342932c1d4f24c6e65074e1bf47b519537
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
When attempting to connect a tcp-based QLocalSocket while it was
already connected, the open() (and connectToServer()) method
failed silently. That behavior was not helpful and inconsistent
with the windows and unix implementations.
So an error is now set and error() is emitted
Change-Id: I544e81f0a303dd6d5b1869287df860878a8a06c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This QObject-style convention will allow the usual private class
macros to be used.
Change-Id: I992ee2a2d2e7984d57feb4cbe785a267f2fd83ce
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The new constructor accepts reference to the private
class provided by a subclass.
Change-Id: I568e31727bb90de12ee8bb7bf0ed442737056470
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This QObject-style convention will allow the usual private class
macros to be used.
Change-Id: Ib1cee0b3aca949b75511868ad4914e5b8530929b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Allow the private class to be instantiated before the public class.
Public subclasses will need to first instantiate the private subclass
and pass the reference to QSqlResult.
Add virtual constructor so QSqlResult can delete private class
polymorphically.
Change-Id: Ide7115dbb4150d6604677b542dbec16e6956a142
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Under certain circumstances, mktime failes to convert the tm struct into secs since epoch.
This is a workaround and fixes the qdatetime and qqmllocale autotests.
Change-Id: If99385142a049c5315429dca177df7fc8e947d55
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@rim.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSharedMemory and QSystemSemaphore are not available on QNX so the autotests can not be built.
Change-Id: Ibfb405f951d21342d64bf215cedc203a8cefe070
Reviewed-by: Wolfgang Bremer <wbremer@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ic3e5deaeabe282ff44400aba80f8746067473030
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>