mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 22:45:33 +00:00
Got rid of some unwanted warnings and did some cleanup on the launcher
This commit is contained in:
parent
e21442f6cc
commit
d162445e68
3 changed files with 5 additions and 26 deletions
|
@ -1072,7 +1072,8 @@ void DataFilesPage::writeConfig(QString profile)
|
|||
msgBox.setWindowTitle("Error creating OpenMW configuration directory");
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setText(tr("<br><b>Could not create %0</b><br><br> \Please make sure you have the right permissions and try again.<br>").arg(pathStr));
|
||||
msgBox.setText(tr("<br><b>Could not create %0</b><br><br> \
|
||||
Please make sure you have the right permissions and try again.<br>").arg(pathStr));
|
||||
msgBox.exec();
|
||||
|
||||
qApp->exit(1);
|
||||
|
@ -1089,7 +1090,7 @@ void DataFilesPage::writeConfig(QString profile)
|
|||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setText(tr("<br><b>Could not open or create %0</b><br><br> \
|
||||
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
|
||||
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
|
||||
msgBox.exec();
|
||||
|
||||
qApp->exit(1);
|
||||
|
@ -1120,7 +1121,7 @@ void DataFilesPage::writeConfig(QString profile)
|
|||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setText(tr("<br><b>Could not write to %0</b><br><br> \
|
||||
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
|
||||
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
|
||||
msgBox.exec();
|
||||
|
||||
qApp->exit(1);
|
||||
|
|
|
@ -28,7 +28,7 @@ QString FileDialog::getExistingDirectory(QWidget *parent,
|
|||
// create a non-native file dialog
|
||||
FileDialog dialog;
|
||||
dialog.setFileMode(DirectoryOnly);
|
||||
dialog.setOptions(options & DontUseNativeDialog | ShowDirsOnly);
|
||||
dialog.setOptions(options & (DontUseNativeDialog | ShowDirsOnly));
|
||||
|
||||
if (!caption.isEmpty())
|
||||
dialog.setWindowTitle(caption);
|
||||
|
|
|
@ -5,45 +5,23 @@
|
|||
|
||||
class QPushButton;
|
||||
|
||||
struct FileDialogArgs
|
||||
{
|
||||
FileDialogArgs() : parent(0), mode(QFileDialog::AnyFile) {}
|
||||
QWidget *parent;
|
||||
QString caption;
|
||||
QString directory;
|
||||
QString selection;
|
||||
QString filter;
|
||||
QFileDialog::FileMode mode;
|
||||
QFileDialog::Options options;
|
||||
|
||||
};
|
||||
|
||||
class FileDialog : public QFileDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileDialog(QWidget *parent = 0);
|
||||
// FileDialog(QWidget *parent, Qt::WindowFlags f);
|
||||
|
||||
//QString getExistingDirectory();
|
||||
static QString getExistingDirectory(QWidget *parent = 0,
|
||||
const QString &caption = QString(),
|
||||
const QString &dir = QString(),
|
||||
Options options = ShowDirsOnly);
|
||||
//FileDialog mDirectoryDialog;
|
||||
|
||||
bool initialized;
|
||||
protected:
|
||||
|
||||
private slots:
|
||||
// void updateOkButton(const QString &text);
|
||||
void updateChooseButton(const QString &directory);
|
||||
//void
|
||||
|
||||
private:
|
||||
QPushButton *mChooseButton;
|
||||
//QFileDialog *mDirectoryDialog;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue