Skip to content

Commit

Permalink
Fix build error on windows (#420)
Browse files Browse the repository at this point in the history
Co-authored-by: yangheran <[email protected]>
  • Loading branch information
feiniks and yangheran authored Jun 17, 2024
1 parent 8fa2954 commit bb25efd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/seadrive-gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ SeadriveGui::~SeadriveGui()

}

#ifdef Q_OS_MAC
bool loadConfigCB(sqlite3_stmt *stmt, void *data)
{
SettingsManager *mgr = static_cast<SettingsManager* >(data);
Expand Down Expand Up @@ -304,11 +303,13 @@ bool loadConfigCB(sqlite3_stmt *stmt, void *data)
int threshold = atoi(value);
mgr->setDeleteConfirmThreshold(threshold);
} else if (strcmp(key, "hide_windows_incompatible_path_notification") == 0) {
#ifdef Q_OS_MAC
if (strcmp(value, "true") == 0) {
mgr->setHideWindowsIncompatibilityPathMsg(true);
} else {
mgr->setHideWindowsIncompatibilityPathMsg(false);
}
#endif
}
return true;
}
Expand All @@ -333,6 +334,7 @@ void SeadriveGui::migrateOldConfig(const QString& dataDir)
sqlite3_close(db);
}

#ifdef Q_OS_MAC
void SeadriveGui::migrateOldData()
{
QString data_dir = QDir(seadriveDir()).filePath("data");
Expand Down
3 changes: 2 additions & 1 deletion src/seadrive-gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ class SeadriveGui : public QObject {

#ifdef Q_OS_MAC
void migrateOldData();
void migrateOldConfig(const QString& data_dir);
#endif

void migrateOldConfig(const QString& data_dir);

#if defined(Q_OS_WIN32)
QString seadriveRoot() const;
#endif
Expand Down

0 comments on commit bb25efd

Please sign in to comment.