Skip to content
GitLab
Menu
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
1279bb58
Commit
1279bb58
authored
Dec 15, 2008
by
mae
Browse files
readd "Recent Projects" menu.
parent
ffc082a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/projectexplorer.cpp
View file @
1279bb58
...
...
@@ -406,16 +406,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
#endif
#if 0
// recent projects menu
Core::IActionContainer *mrecent =
am->createMenu(Constants::M_RECENTPROJECTS);
mrecent->menu()->setTitle("Recent Projects");
mfile->addMenu(mrecent, Core::Constants::G_FILE_PROJECT);
connect(mfile->menu(), SIGNAL(aboutToShow()),
this, SLOT(updateRecentProjectMenu()));
#endif
// Default open action
m_openFileAction
=
new
QAction
(
tr
(
"Open File"
),
this
);
cmd
=
am
->
registerAction
(
m_openFileAction
,
ProjectExplorer
::
Constants
::
OPENFILE
,
...
...
@@ -425,6 +415,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
// Open With menu
mfilec
->
addMenu
(
openWith
,
ProjectExplorer
::
Constants
::
G_FILE_OPEN
);
// recent projects menu
Core
::
IActionContainer
*
mrecent
=
am
->
createMenu
(
Constants
::
M_RECENTPROJECTS
);
mrecent
->
menu
()
->
setTitle
(
"Recent Projects"
);
mfile
->
addMenu
(
mrecent
,
Core
::
Constants
::
G_FILE_OPEN
);
connect
(
mfile
->
menu
(),
SIGNAL
(
aboutToShow
()),
this
,
SLOT
(
updateRecentProjectMenu
()));
// unload action
m_unloadAction
=
new
QAction
(
tr
(
"Unload Project"
),
this
);
cmd
=
am
->
registerAction
(
m_unloadAction
,
Constants
::
UNLOAD
,
globalcontext
);
...
...
@@ -1498,8 +1496,7 @@ void ProjectExplorerPlugin::openRecentProject()
QAction
*
a
=
qobject_cast
<
QAction
*>
(
sender
());
if
(
m_recentProjectsActions
.
contains
(
a
))
{
const
QString
fileName
=
m_recentProjectsActions
.
value
(
a
);
if
(
ProjectFileFactory
*
pf
=
findProjectFileFactory
(
fileName
))
pf
->
open
(
fileName
);
openProject
(
fileName
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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