Do not destroy QEventLoop until it's exec() call
is over. Instead only call exit() for all loops
when the settings dialog is closed.
Change-Id: I9598270ee5f4d294ffcad9b45dda4543e15d63f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If the vertical scrollbar is invisible, it reports a width of 100
pixels. Use the width of the size hint, instead.
Task-number: QTCREATORBUG-20353
Change-Id: I3d50041788f12360a98a8f41923c6a38e23a63e3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
With a custom deleter the event loop is exiting. The erase function is
defining the order of deletion.
Change-Id: I50cb166c4e117cbb779db2d1b992221cd1d8ad60
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Set the minimum size on first start to something reasonable. Currently
the SettingsDialog starts out tiny on Linux and is unusable till
resized for the first time with empty settings.
Change-Id: I1e0f6dc0bc5a41ba53f655f81181fbba84da23df
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Only the getSettingsDialog + exec combination was ever used. Make
that accessible by a free function, move everything else to
settingdialog.cpp.
Take the opportunity for some code cosmetics and remove a few
indirections by using direct members instead of pointers where
appropriate.
Change-Id: I14bc47395a85045ab439d418da0bc459add844bb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If the settings dialog contains more than one visible tabbar when
trying to access its tabs Squish fails to distinguish them.
Assign a unique name for the main tabbar of a category inside
the settings dialog.
Change-Id: I349b480871306784b5adc9858984933dc26d7958
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If QTC_SCREENSHOTS_PATH points to a writable directory, each widget that
has been registered with ICore's setupScreenShooter(const QString &name,
QWidget *w) will dump a screen shot to this directory as soon as the
widget is shown.
Change-Id: I2dec12064f1bb3c510d2fd9d27c1b79f7b7d5f30
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.
This patch replaces many occurencies of qApp with the according
Q*Application classname.
Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
Improve handling of page sizes, especially of the kits page (with
small and big dialog sizes).
Change-Id: I8dba7b4b5028cb41e0719a2f9aec15eb89858a8a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
For pages that are not delayed additionally by an OptionsPageProvider,
we can just look for the ID without creating any widgets.
Task-number: QTCREATORBUG-15848
Change-Id: I118aa4713e76c8a43df7abad9f846e68105c659e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Designer options were always coming last because that uses an options
provider instead of option pages directly.
Change-Id: I2c02ce7d2ff122beb5d563a9c9ac263bdc71f62b
Reviewed-by: hjk <hjk@theqtcompany.com>
Since we are referring to them by ID without specifying the category in
addition.
This requirement was implicitly added by
592ffe7377
Task-number: QTCREATORBUG-14742
Change-Id: I7be539127b76de90c19b0282565d845fa42010ab
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Whenever you remove a plugin with a settings page you will eventually
run into this. We can silently ignore it.
Change-Id: I887d7e7d21e1e2f68375b60456160f9998f9c650
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
PageIds are supposed to be unique, so the CategoryId can be determined
from the PageId. Look for PageIds in the already expanded categories
first before searching through expensive categories.
Change-Id: I006beb0df6183453163ac1810fe59a306a0f52b1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
The default button would move to the first pushbutton that got focus.
E.g. tabbing through the android settings would move the default button
to the first button that got focus.
The cause of that is that for QPushButton::setDefault to work, the
button needs to be a child of the QDialog. So call it after adding
the buttongroup to the layout.
Change-Id: Ife35bf15aa8585f7931a87ee715f316bb02b36be
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
E.g. when opening Designer > Forms, restarting Qt Creator and opening
options dialog again.
Change-Id: I0cfabed8c9e7ef8c98abab5490181223558e21a2
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
By taking the translated text from designer.
This way we don't freeze directly when filtering the options page. We
still have to initialize designer (and therefore freeze) the moment that
category gets selected though (which can also happen during filtering).
Task-number: QTCREATORBUG-9584
Change-Id: I88275db97f87a5da8c565bccc8ae41de3b51a135
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The default "matches" method now takes the widget and looks for all
child labels, checkboxes, push buttons and group boxes.
Because of that, the former "createWidget" method
can be called multiple times without creating a new widget
(-->widget()), and the "finished" method must ensure that the created
widget gets deleted, since not all widgets that were created are added
to the UI anymore.
Change-Id: Ia231c7c78dd8819146668e6447d36d22e7836904
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* choose an enabled tab if current tab gets disabled (for some reason
that is not automatically done by QTabWidget
* don't show any widget if the filter string is not matched by anything
Task-number: QTCREATORBUG-8318
Change-Id: I0066c2b3aeb9cc0cdacaa0a88f9adbc70c20cfa7
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Widgets and layouts take more space on Mac than on the other platforms,
and that results in developers designing pages that are too heigh for
Mac even though they fit on other platforms. Since redesigning
preference pages so they also fit on Mac all the time is not ideal,
simply account for the larger needed space.
Change-Id: Ib8483713f562436bc9a86063f345ae4e44473608
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
a) Paths that are already set in more general files
such as qtcreator.pri.
b) Paths that serve no purpose at all, possibly
left over from earlier versions of the project.
c) Paths that act as workarounds for wrong include
statements of the form '#include "xyz.h"', where
xyz.h is not in the same directory as the including
file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.
Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
On a german locale the category view has a horizontal scrollbar. This is
because the initial sizeHint is calculated while the vertical scrollbar
is not visible. This patch ensures that the sizeHint is updated if the
scrollbar is shown.
Change-Id: Ic97c0c3650f765dbf6d8f84f2c168630c65ee89f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reduce the padding in some often-used structs for 64bit machines.
32bit machines should also profit from most changes, but to a
lesser degree.
Change-Id: Ic4c67b94e962731de4f31164c52a372d78944ccc
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Use data members instead of virtual functions for id, displayName and
priority, use Core::Id, not QStrings for id, de-pimpl CommandLocator.
Change-Id: Id8b41f184cb995138b2d76c923d6d3ae02b7e3f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>