Remove Two methods of ElementsLocation

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4389 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-03-20 15:54:28 +00:00
parent 4fe4509885
commit 10fcaa09d1
6 changed files with 16 additions and 51 deletions

View File

@@ -371,42 +371,6 @@ QString ElementsLocation::toString() const {
return(result);
}
/**
Charge l'emplacemant a partir d'une chaine de caractere du type
project42+embed://foo/bar/thing.elmt
@param string Une chaine de caracteres representant l'emplacement
*/
void ElementsLocation::fromString(const QString &string) {
QRegExp embedded("^project([0-9]+)\\+(embed:\\/\\/.*)$", Qt::CaseInsensitive);
if (embedded.exactMatch(string)) {
bool conv_ok = false;
uint project_id = embedded.capturedTexts().at(1).toUInt(&conv_ok);
if (conv_ok) {
QETProject *the_project = QETApp::project(project_id);
if (the_project) {
m_collection_path = embedded.capturedTexts().at(2);
m_project = the_project;
return;
}
}
}
// fallback : le chemin devient la chaine complete et aucun projet n'est utilise
m_collection_path = string;
m_project = 0;
}
/**
@param string Une chaine de caracteres representant l'emplacement
@return un emplacemant a partir d'une chaine de caractere du type
project42+embed://foo/bar/thing.elmt
*/
ElementsLocation ElementsLocation::locationFromString(const QString &string) {
ElementsLocation location;
location.fromString(string);
return(location);
}
/**
* @brief ElementsLocation::isElement
* @return true if this location represent an element