[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevplatform
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2009-11-08 15:43:00
Message-ID: 1257694980.961416.20506.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1046384 by apaku:
open/close shouldn't be public API.
Both of those functions are not useful outside of shell, so lets not expose the API.
M +0 -14 interfaces/iproject.h
M +2 -2 shell/project.h
M +10 -2 shell/projectcontroller.cpp
--- trunk/KDE/kdevplatform/interfaces/iproject.h #1046383:1046384
@@ -135,20 +135,6 @@
public Q_SLOTS:
/**
- * @brief Open a project
- * This method opens a project and starts the process of loading the
- * data for the project from disk.
- * @param projectFileUrl The url pointing to the location of the project
- * file to load
- * The project name is taken from the Name key in the project file in
- * the 'General' group
- */
- virtual Q_SCRIPTABLE bool open(const KUrl &projectFileUrl) = 0;
-
- /** This method is invoked when the project needs to be closed. */
- virtual Q_SCRIPTABLE void close() = 0;
-
- /**
* @brief Get the project folder
* @return The canonical absolute directory of the project.
*/
--- trunk/KDE/kdevplatform/shell/project.h #1046383:1046384
@@ -94,10 +94,10 @@
* The project name is taken from the Name key in the project file in
* the 'General' group
*/
- virtual Q_SCRIPTABLE bool open(const KUrl &projectFileUrl);
+ bool open(const KUrl &projectFileUrl);
/** This method is invoked when the project needs to be closed. */
- virtual Q_SCRIPTABLE void close();
+ void close();
/**
* @brief Get the project folder
--- trunk/KDE/kdevplatform/shell/projectcontroller.cpp #1046383:1046384
@@ -716,12 +716,20 @@
}
}
-void ProjectController::closeProject(IProject* proj)
+void ProjectController::closeProject(IProject* proj_)
{
- if(!proj || d->m_projects.indexOf(proj) == -1)
+ if(!proj_ || d->m_projects.indexOf(proj_) == -1)
{
return;
}
+
+ Project* proj = dynamic_cast<KDevelop::Project*>( proj_ );
+ if( !proj )
+ {
+ kWarning() << "Unknown Project subclass found!";
+ return;
+ }
+
d->m_projects.removeAll(proj);
emit projectClosing(proj);
//Core::self()->saveSettings(); // The project file is being closed.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic