Small Flatpak fixes, Qt6 beta build fix
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Syping 2020-10-21 19:14:20 +02:00
parent f8049c8178
commit fcbe264d63
5 changed files with 29 additions and 16 deletions

View File

@ -47,7 +47,9 @@ PictureWidget::PictureWidget(QWidget *parent) : QDialog(parent)
QObject::connect(pictureLabel, SIGNAL(mouseDoubleClicked(Qt::MouseButton)), this, SLOT(pictureDoubleClicked(Qt::MouseButton)));
QObject::connect(pictureLabel, SIGNAL(customContextMenuRequested(QPoint)), parent, SLOT(exportCustomContextMenuRequested(QPoint)));
#if QT_VERSION < 0x060000
QObject::connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(updateWindowSize(int)));
#endif
setLayout(widgetLayout);
}

View File

@ -179,7 +179,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D
ui->vlUserInterface->setContentsMargins(9 * screenRatio, 9 * screenRatio, 9 * screenRatio, 9 * screenRatio);
}
void UserInterface::setupDirEnv()
void UserInterface::setupDirEnv(bool showFolderDialog)
{
// settings init
QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);
@ -192,20 +192,23 @@ void UserInterface::setupDirEnv()
}
else
{
GTAV_Folder = QFileDialog::getExistingDirectory(this, tr("Select GTA V Folder..."), StandardPaths::documentsLocation(), QFileDialog::ShowDirsOnly);
if (QFileInfo(GTAV_Folder).exists())
if (showFolderDialog)
{
folderExists = true;
QDir::setCurrent(GTAV_Folder);
AppEnv::setGameFolder(GTAV_Folder);
// First time folder selection save
settings.beginGroup("dir");
if (settings.value("dir", "").toString().isEmpty())
GTAV_Folder = QFileDialog::getExistingDirectory(this, tr("Select GTA V Folder..."), StandardPaths::documentsLocation(), QFileDialog::ShowDirsOnly);
if (QFileInfo(GTAV_Folder).exists())
{
settings.setValue("dir", GTAV_Folder);
folderExists = true;
QDir::setCurrent(GTAV_Folder);
AppEnv::setGameFolder(GTAV_Folder);
// First time folder selection save
settings.beginGroup("dir");
if (settings.value("dir", "").toString().isEmpty())
{
settings.setValue("dir", GTAV_Folder);
}
settings.endGroup();
}
settings.endGroup();
}
}

View File

@ -48,7 +48,7 @@ public:
#else
explicit UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, DatabaseThread *threadDB, QWidget *parent = 0);
#endif
void setupDirEnv();
void setupDirEnv(bool showFolderDialog = true);
~UserInterface();
private slots:

View File

@ -133,7 +133,7 @@ int main(int argc, char *argv[])
{
if (isFirstStart)
{
QMessageBox::StandardButton button = QMessageBox::information(a.desktop(), QString("%1 %2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER), QApplication::tr("<h4>Welcome to %1!</h4>You want to configure %1 before you start using it?").arg(GTA5SYNC_APPSTR), QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
QMessageBox::StandardButton button = QMessageBox::information(nullptr, QString("%1 %2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER), QApplication::tr("<h4>Welcome to %1!</h4>You want to configure %1 before you start using it?").arg(GTA5SYNC_APPSTR), QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
if (button == QMessageBox::Yes)
{
ProfileDatabase profileDB;
@ -320,7 +320,11 @@ int main(int argc, char *argv[])
UserInterface uiWindow(&profileDB, &crewDB, &threadDB);
#endif
uiWindow.setWindowIcon(IconLoader::loadingAppIcon());
#ifdef GTA5SYNC_FLATPAK
uiWindow.setupDirEnv(false);
#else
uiWindow.setupDirEnv();
#endif
#ifdef Q_OS_ANDROID
uiWindow.showMaximized();
#else

View File

@ -17,13 +17,17 @@
<p>Open Source Snapmatic picture and Savegame viewer/editor for GTA V</p>
<p>Features</p>
<ul>
<li>View Snapmatics with the ability to disable them in-game*</li>
<li>View Snapmatics with the ability to disable them in-game</li>
<li>Edit Snapmatic pictures and properties in multiple ways</li>
<li>Import**/Export Snapmatics, Savegames and pictures</li>
<li>Import/Export Snapmatics, Savegames and pictures</li>
<li>Choose between multiple Social Club accounts as GTA V profiles IDs</li>
</ul>
</description>
<categories>
<category>Utility</category>
</categories>
<developer_name>Syping</developer_name>
<releases>