Commit 80f78eaa authored by dt's avatar dt
Browse files

ProjecteExplorerPlugin: loadProject -> openProject

loadProject did mostly the same as openProject. So it can be removed.
(Also the error handling was wrong too.)
parent aa66684b
......@@ -957,7 +957,7 @@ void ProjectExplorerPlugin::loadAction()
d->m_projectFilterString);
if (filename.isEmpty())
return;
loadProject(filename);
openProject(filename);
updateActions();
}
......@@ -1166,18 +1166,6 @@ void ProjectExplorerPlugin::savePersistentSettings()
}
}
void ProjectExplorerPlugin::loadProject(const QString &project)
{
if (!openProject(project)) {
QMessageBox box(QMessageBox::Warning,
tr("Failed to open project"),
tr("Failed to open project:\n%1").arg(project),
QMessageBox::Ok,
Core::ICore::instance()->mainWindow());
box.exec();
}
}
bool ProjectExplorerPlugin::openProject(const QString &fileName)
{
if (debug)
......@@ -1359,7 +1347,7 @@ void ProjectExplorerPlugin::restoreSession()
connect(modeManager, SIGNAL(currentModeChanged(Core::IMode*, Core::IMode*)),
this, SLOT(currentModeChanged(Core::IMode*, Core::IMode*)));
connect(d->m_welcomePage, SIGNAL(requestSession(QString)), this, SLOT(loadSession(QString)));
connect(d->m_welcomePage, SIGNAL(requestProject(QString)), this, SLOT(loadProject(QString)));
connect(d->m_welcomePage, SIGNAL(requestProject(QString)), this, SLOT(openProject(QString)));
QStringList combinedList;
// Converts "filename" "+45" or "filename" ":23"
......
......@@ -80,7 +80,7 @@ public:
static ProjectExplorerPlugin *instance();
bool openProject(const QString &fileName);
Q_SLOT bool openProject(const QString &fileName);
QList<Project *> openProjects(const QStringList &fileNames);
SessionManager *session() const;
......@@ -209,7 +209,6 @@ private slots:
void updateDeployActions();
void slotUpdateRunActions();
void loadProject(const QString &project);
void currentModeChanged(Core::IMode *mode, Core::IMode *oldMode);
void updateActions();
void loadCustomWizards();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment