Skip to content

Commit

Permalink
Convert use of QMessageBox to Qt 4.2 StandardButton API.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6442 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Jan 18, 2007
1 parent 973e43b commit ebbf38f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/mapserver_export/qgsmapserverexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,16 @@ bool QgsMapserverExport::write()
{

//QMessageBox::information(0,"Full Path",fullPath);
int okToSave = 0;
QMessageBox::StandardButton okToSave = QMessageBox::Ok;
// Check for file and prompt for overwrite if it exists
if (QFile::exists(txtMapFilePath->text()))
{
okToSave = QMessageBox::warning(0, tr("Overwrite File?"), txtMapFilePath->text() +
tr(" exists. \nDo you want to overwrite it?",
"a filename is prepended to this text, and appears in a dialog box"), tr("Yes"), tr("No"));
"a filename is prepended to this text, and appears in a dialog box"),
QMessageBox::Ok | QMessageBox::Cancel);
}
if (okToSave == 0)
if (okToSave == QMessageBox::Ok)
{
// write the project information to the selected file
writeMapFile();
Expand Down

0 comments on commit ebbf38f

Please sign in to comment.