Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
5c8ce80e
Commit
5c8ce80e
authored
Jul 13, 2010
by
con
Browse files
Adapt Qt Creator plugin template to match recent changes.
parent
b3dbc4b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.cpp
View file @
5c8ce80e
...
...
@@ -3,6 +3,7 @@
#include
<QtPlugin>
#include
<coreplugin/icore.h>
#include
<coreplugin/icontext.h>
#include
<coreplugin/actionmanager/actionmanager.h>
#include
<coreplugin/actionmanager/command.h>
#include
<coreplugin/actionmanager/actioncontainer.h>
...
...
@@ -47,7 +48,7 @@ bool %PluginName%Impl::initialize(const QStringList &arguments, QString *errorSt
QAction
*
action
=
new
QAction
(
tr
(
"%PluginName% action"
),
this
);
Core
::
Command
*
cmd
=
am
->
registerAction
(
action
,
QLatin1String
(
ACTION_ID
),
QList
<
int
>
()
<<
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
(
Core
::
Constants
::
C_GLOBAL
)
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
tr
(
"Ctrl+Alt+Meta+A"
)));
connect
(
action
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
triggerAction
()));
...
...
@@ -66,10 +67,12 @@ void %PluginName%Impl::extensionsInitialized()
// plugins that depend on it are completely initialized."
}
void
%
PluginName
%
Impl
::
aboutToShutdown
()
ExtensionSystem
::
IPlugin
::
ShutdownFlag
%
PluginName
%
Impl
::
aboutToShutdown
()
{
// Save settings
// Disconnect from signals that are not needed during shutdown
// Hide UI (if you add UI that is not in the main window directly)
return
SynchronousShutdown
;
}
void
%
PluginName
%
Impl
::
triggerAction
()
...
...
share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h
View file @
5c8ce80e
...
...
@@ -18,7 +18,7 @@ public:
bool
initialize
(
const
QStringList
&
arguments
,
QString
*
errorString
);
void
extensionsInitialized
();
void
aboutToShutdown
();
ShutdownFlag
aboutToShutdown
();
private
slots
:
void
triggerAction
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment