One vector with things handled together can be better
that keeping four vectors in sync.
Change-Id: I47865a5a2147a3795a3c820aa2676fb9611cab25
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Only visible when a model editor is active
Change-Id: Ia21045188867b23815bd05432d1fd4699de8bd61
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Public entry points for displaying settings dialog were in ICore,
diverting to MainWindow, and back in some cases.
Move implementation to icore.cpp instead.
Change-Id: I02cbf1dcfe6241c665d7d701b4b4af1a8a242af5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
cf7f898db3 broke initial mode display due to the then-intentional
delay in registration. Now change the approach: Only record
the modes and the last requested start mode and do all remaining
setup triggered from MainWindow::extensionsInitialized.
This changes behavior insofar as only the last requested mode
on startup (typical Welcome, if Welcome not loaded, Edit) will
be activated.
Change-Id: I62b28342c347938b001c6d3be6a076c5a69b560b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Instead of relying on addObject notification, provide a
StatusBarManager::addStatusBarWidget() method to create,
register and keep track of an IContext object.
That's essentially what was StatusBarWidget before, but does
not need to be known on the user side. For removal, this
provides a StatusBarManager::destroyStatusBarWidget(),
any not explicitly removed items are handled in response
to ICore::coreAboutToClose()
The StatusBarManager class is fully static now, could
be a namespace.
Change-Id: Ia2bd13b391c3f68c8dfd584b53524a9649cc0787
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Mechanical in preparation of 'static pattern' and avoiding the
object pool objectAdded/objectAboutToBeRemoved use
Change-Id: I1e3fc7f67c785410686d0dc7c083024e305f4abe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... instead of having the indirection of the global object pool.
ModeManagerPrivate has been maintaining the list of instantiated
modes by tracking (all...) pool object additions / removals. This
can be achieved more directly by calling functions from the
IMode base constructor/destructor.
The pattern used deviates a bit from the otherwise used 'static
QList<Foo *> allFoos();' acessor pattern as there is some sorting
logic etc. associated each time a mode is appended.
Sticking to the preexisting structure seemed less effort for now.
Change-Id: Ic1b4e641e155f949248890acc48cafbe74025115
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The popup is corresponding to the button (and the summary progress bar),
and that automatically also moves it away from the right border a bit.
Task-number: QTCREATORBUG-19308
Change-Id: Ie6f72f19552285586395776b175ca142f56c7d6e
Reviewed-by: Alessandro Portale <alessandro.portale@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>
Also, add context to connect() expressions where we are or were
capturing "this".
Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
When closing the application via Quit from the application's context
menu in the dock, Qt sends the closeEvent twice, leading to funny issues
(QTBUG-43344).
Remember if we already successfully went through the closeEvent, and
skip it in that case.
Task-number: QTCREATORBUG-18798
Change-Id: I8c54f0695b1af2572fa0ade7487a6a993022946b
Reviewed-by: Christian Stenger <christian.stenger@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>
Ctrl+0 was confliciting with "Reset Font Size".
Task-number: QTCREATORBUG-17857
Change-Id: I280c65446fd1f8ce3af66b06760ed7b9b210e8c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Ctrl+0 is used for the left sidebar on Mac,
so it should be save to use it for the right
sidebar on Linux/Windows.
The original shortcut (Ctrl+Shift+0) is used by Windows 10
and therefore does not work.
Task-number: QTCREATORBUG-17857
Change-Id: I832135c3779508b9789b5be4757e1bbc9bd255eb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.
Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The new project window works better with 1280 pixel. Assume that is
a good default width in 2016.
Change-Id: I0c96db1bd279f6587e69c36ca01d1cd4f5243769
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Also register it as a window for the Window menu.
Task-number: QTCREATORBUG-14604
Change-Id: Ib52dcc193bf480ade14ca7c34b4dc10d6ec8fc4a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Don't show them for sessions on macOS, don't show any numbers > 9, and
don't use colons.
Change-Id: I34a60631e5d11a98f22cfcf374f8cec1a2964658
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
There are no accelerators on macOS, so these numbers are unnecessary
noise.
Change-Id: I0402dd961dbe955837e0aa70b92aef33f61d61bd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Serhii Moroz <frost.asm@gmail.com>
Save them also whenever a settings save is requested, which e.g. also
happens when closing the options dialog.
Change-Id: Ic20f1007381a4d0a8157f17fd24c0d8ea24907ee
Task-number: QTCREATORBUG-16576
Reviewed-by: David Schulz <david.schulz@qt.io>
It was a regression from the "Move icons to Utils" commit which
broke qbs builds.
QTCREATORLOGO_BIG aka QtProject-qtcreator.png is only used in
coreplugin and have some not moved install logic inside
coreplugin.pro
Change-Id: I8258b845108f8801581d7ee8d6771808b306a602
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This way we can use them from libraries, not only from plugins.
Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This change makes sure that the usage of Qt Creator logo is HigDPI
aware. We use qrc file name aliases to be able to use the "@2x"
mechanism.
Change-Id: I8dbb77b6cd9a3b6ab4530b84c18e0f83a662d710
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The old file name was still hanging around after all files were closed.
Also reduce number of translated strings.
Task-number: QTCREATORBUG-14800
Change-Id: I437072be0f7dcd26f55a7895d20cf8fe6e3cd8b5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
It doesn't really make sense to have that handling deep in the
FancyTabWidget.
Change-Id: If4b4b9b9c3cbc49c25091982b398fb18f9bf87c2
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.
Icons are now listed in per-plugin *icons.h headers.
RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.
Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Because the editor manager was asked first if it wants to
abort closing (because closing an editor failed), editors
were closed before any other close listener was asked.
Ask the editor manager last to avoid ending up with an
empty editor list when canceling for some other reason.
Change-Id: Ie56866cb668a717b7072d8092b4d86b7b3196d01
Task-number: QTCREATORBUG-14401
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
ICoreListener::coreAboutToClose() remains in the core,
ICoreListener::editorAboutToClose() is handled by a new
EditorManager::addCloseEditorListener() function.
This removes the need for some boiler plate code resulting
from the need to implement the interface in custom classes
(DesignModeCoreListener, EditorClosingCoreListener,
PojectEplorer::CoreListener and VcsBase::CoreListener).
EditorManager::addCloseEditorListener
Change-Id: Ie554c987b5455b555be6d77b77e4013639201d22
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>