mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Modification of the qmessagebox during the open of project
more recently than the qet's version used. The qmessagebox request if we want continue or cancel the open of project git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1314 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -827,17 +827,26 @@ void QETProject::readProjectXml() {
|
||||
bool conv_ok;
|
||||
project_qet_version_ = root_elmt.attribute("version").toDouble(&conv_ok);
|
||||
if (conv_ok && QET::version.toDouble() < project_qet_version_) {
|
||||
QET::MessageBox::warning(
|
||||
|
||||
int ret = QET::MessageBox::warning(
|
||||
0,
|
||||
tr("Avertissement", "message box title"),
|
||||
tr(
|
||||
"Ce document semble avoir \351t\351 enregistr\351 avec "
|
||||
"une version ult\351rieure de QElectroTech. Il est "
|
||||
"possible que l'ouverture de tout ou partie de ce "
|
||||
"document \351choue.",
|
||||
"document \351choue.\n"
|
||||
"Que d\351sirez vous faire ?",
|
||||
"message box content"
|
||||
)
|
||||
),
|
||||
QMessageBox::Open | QMessageBox::Cancel
|
||||
);
|
||||
|
||||
if (ret == QMessageBox::Cancel) {
|
||||
state_ = FileOpenDiscard;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user