forked from qt-creator/qt-creator
remove MessageManager::displayStatusMessage
This commit is contained in:
@@ -68,12 +68,6 @@ void MessageManager::showOutputPane()
|
|||||||
m_messageOutputWindow->popup(false);
|
m_messageOutputWindow->popup(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageManager::displayStatusBarMessage(const QString & /*text*/, int /*ms*/)
|
|
||||||
{
|
|
||||||
// TODO: Currently broken, but no one really notices, so...
|
|
||||||
//m_mainWindow->statusBar()->showMessage(text, ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MessageManager::printToOutputPane(const QString &text, bool bringToForeground)
|
void MessageManager::printToOutputPane(const QString &text, bool bringToForeground)
|
||||||
{
|
{
|
||||||
if (!m_messageOutputWindow)
|
if (!m_messageOutputWindow)
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ public:
|
|||||||
|
|
||||||
static MessageManager *instance() { return m_instance; }
|
static MessageManager *instance() { return m_instance; }
|
||||||
|
|
||||||
void displayStatusBarMessage(const QString &text, int ms = 0);
|
|
||||||
void showOutputPane();
|
void showOutputPane();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|||||||
@@ -109,13 +109,6 @@ MessageManagerPrototype::MessageManagerPrototype(QObject *parent) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageManagerPrototype::displayStatusBarMessage(const QString &text, int ms)
|
|
||||||
{
|
|
||||||
MessageManager *mm = qscriptvalue_cast<MessageManager *>(thisObject());
|
|
||||||
QTC_ASSERT(mm, return);
|
|
||||||
mm->displayStatusBarMessage(text, ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MessageManagerPrototype::printToOutputPane(const QString &text, bool bringToForeground)
|
void MessageManagerPrototype::printToOutputPane(const QString &text, bool bringToForeground)
|
||||||
{
|
{
|
||||||
MessageManager *mm = qscriptvalue_cast<MessageManager *>(thisObject());
|
MessageManager *mm = qscriptvalue_cast<MessageManager *>(thisObject());
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ QString Manager::mimeType() const
|
|||||||
ProjectExplorer::Project *Manager::openProject(const QString &fileName)
|
ProjectExplorer::Project *Manager::openProject(const QString &fileName)
|
||||||
{
|
{
|
||||||
Core::MessageManager *messageManager = Core::ICore::instance()->messageManager();
|
Core::MessageManager *messageManager = Core::ICore::instance()->messageManager();
|
||||||
messageManager->displayStatusBarMessage(tr("Loading project %1 ...").arg(fileName), 50000);
|
|
||||||
|
|
||||||
QFileInfo fileInfo(fileName);
|
QFileInfo fileInfo(fileName);
|
||||||
ProjectExplorer::ProjectExplorerPlugin *projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
|
ProjectExplorer::ProjectExplorerPlugin *projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
|
||||||
|
|||||||
@@ -181,7 +181,6 @@ QString Qt4Manager::mimeType() const
|
|||||||
ProjectExplorer::Project* Qt4Manager::openProject(const QString &fileName)
|
ProjectExplorer::Project* Qt4Manager::openProject(const QString &fileName)
|
||||||
{
|
{
|
||||||
Core::MessageManager *messageManager = Core::ICore::instance()->messageManager();
|
Core::MessageManager *messageManager = Core::ICore::instance()->messageManager();
|
||||||
messageManager->displayStatusBarMessage(tr("Loading project %1 ...").arg(fileName), 50000);
|
|
||||||
|
|
||||||
// TODO Make all file paths relative & remove this hack
|
// TODO Make all file paths relative & remove this hack
|
||||||
// We convert the path to an absolute one here because qt4project.cpp
|
// We convert the path to an absolute one here because qt4project.cpp
|
||||||
@@ -191,25 +190,18 @@ ProjectExplorer::Project* Qt4Manager::openProject(const QString &fileName)
|
|||||||
|
|
||||||
if (canonicalFilePath.isEmpty()) {
|
if (canonicalFilePath.isEmpty()) {
|
||||||
messageManager->printToOutputPane(tr("Failed opening project '%1': Project file does not exist").arg(QDir::toNativeSeparators(canonicalFilePath)));
|
messageManager->printToOutputPane(tr("Failed opening project '%1': Project file does not exist").arg(QDir::toNativeSeparators(canonicalFilePath)));
|
||||||
messageManager->displayStatusBarMessage(tr("Failed opening project"), 5000);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ProjectExplorer::Project *pi, projectExplorer()->session()->projects()) {
|
foreach (ProjectExplorer::Project *pi, projectExplorer()->session()->projects()) {
|
||||||
if (canonicalFilePath == pi->file()->fileName()) {
|
if (canonicalFilePath == pi->file()->fileName()) {
|
||||||
messageManager->printToOutputPane(tr("Failed opening project '%1': Project already open").arg(QDir::toNativeSeparators(canonicalFilePath)));
|
messageManager->printToOutputPane(tr("Failed opening project '%1': Project already open").arg(QDir::toNativeSeparators(canonicalFilePath)));
|
||||||
messageManager->displayStatusBarMessage(tr("Failed opening project"), 5000);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messageManager->displayStatusBarMessage(tr("Opening %1 ...").arg(fileName));
|
|
||||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
|
||||||
|
|
||||||
Qt4Project *pro = new Qt4Project(this, canonicalFilePath);
|
Qt4Project *pro = new Qt4Project(this, canonicalFilePath);
|
||||||
registerProject(pro);
|
registerProject(pro);
|
||||||
|
|
||||||
messageManager->displayStatusBarMessage(tr("Done opening project"), 5000);
|
|
||||||
return pro;
|
return pro;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user