mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user