mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 09:36:43 +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.setWindowTitle("Error creating OpenMW configuration directory");
|
||||||
msgBox.setIcon(QMessageBox::Critical);
|
msgBox.setIcon(QMessageBox::Critical);
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
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();
|
msgBox.exec();
|
||||||
|
|
||||||
qApp->exit(1);
|
qApp->exit(1);
|
||||||
|
@ -1089,7 +1090,7 @@ void DataFilesPage::writeConfig(QString profile)
|
||||||
msgBox.setIcon(QMessageBox::Critical);
|
msgBox.setIcon(QMessageBox::Critical);
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.setText(tr("<br><b>Could not open or create %0</b><br><br> \
|
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();
|
msgBox.exec();
|
||||||
|
|
||||||
qApp->exit(1);
|
qApp->exit(1);
|
||||||
|
@ -1120,7 +1121,7 @@ void DataFilesPage::writeConfig(QString profile)
|
||||||
msgBox.setIcon(QMessageBox::Critical);
|
msgBox.setIcon(QMessageBox::Critical);
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.setText(tr("<br><b>Could not write to %0</b><br><br> \
|
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();
|
msgBox.exec();
|
||||||
|
|
||||||
qApp->exit(1);
|
qApp->exit(1);
|
||||||
|
|
|
@ -28,7 +28,7 @@ QString FileDialog::getExistingDirectory(QWidget *parent,
|
||||||
// create a non-native file dialog
|
// create a non-native file dialog
|
||||||
FileDialog dialog;
|
FileDialog dialog;
|
||||||
dialog.setFileMode(DirectoryOnly);
|
dialog.setFileMode(DirectoryOnly);
|
||||||
dialog.setOptions(options & DontUseNativeDialog | ShowDirsOnly);
|
dialog.setOptions(options & (DontUseNativeDialog | ShowDirsOnly));
|
||||||
|
|
||||||
if (!caption.isEmpty())
|
if (!caption.isEmpty())
|
||||||
dialog.setWindowTitle(caption);
|
dialog.setWindowTitle(caption);
|
||||||
|
|
|
@ -5,45 +5,23 @@
|
||||||
|
|
||||||
class QPushButton;
|
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
|
class FileDialog : public QFileDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FileDialog(QWidget *parent = 0);
|
FileDialog(QWidget *parent = 0);
|
||||||
// FileDialog(QWidget *parent, Qt::WindowFlags f);
|
|
||||||
|
|
||||||
//QString getExistingDirectory();
|
|
||||||
static QString getExistingDirectory(QWidget *parent = 0,
|
static QString getExistingDirectory(QWidget *parent = 0,
|
||||||
const QString &caption = QString(),
|
const QString &caption = QString(),
|
||||||
const QString &dir = QString(),
|
const QString &dir = QString(),
|
||||||
Options options = ShowDirsOnly);
|
Options options = ShowDirsOnly);
|
||||||
//FileDialog mDirectoryDialog;
|
|
||||||
|
|
||||||
bool initialized;
|
|
||||||
protected:
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// void updateOkButton(const QString &text);
|
|
||||||
void updateChooseButton(const QString &directory);
|
void updateChooseButton(const QString &directory);
|
||||||
//void
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPushButton *mChooseButton;
|
QPushButton *mChooseButton;
|
||||||
//QFileDialog *mDirectoryDialog;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue