Fix commit "Change the way how the database is exported to file" :

produce a fail to build on OSX
This commit is contained in:
Laurent Trinques
2020-09-23 11:25:46 +02:00
parent 6a47fcddc9
commit 1cf48f62e9

View File

@@ -530,7 +530,7 @@ sqlite3 *projectDataBase::sqliteHandle(QSqlDatabase *db)
{
//sqlite 3 lib isn't availlable for the moment on macosx
//need some help to add sqlite3 lib on macosx compilation
#if Q_OS_MACOS
#ifdef Q_OS_MACOS
return nullptr;
#else
sqlite3 *handle = nullptr;
@@ -562,7 +562,9 @@ void projectDataBase::exportDb(projectDataBase *db,
if (caption_.isEmpty()) {
caption_ = tr("Exporter la base de données interne du projet");
}
#ifdef Q_OS_MACOS
return;
#else
auto dir_ = dir;
if(dir_.isEmpty()) {
dir_ = db->project()->filePath();
@@ -602,4 +604,5 @@ void projectDataBase::exportDb(projectDataBase *db,
file_db.close();
}
QSqlDatabase::removeDatabase(connection_name);
#endif
}