forked from blue/squawk
Merge pull request 'Fixes for Windows' (#57) from shunf4/squawk:fix/win_fix into messageFeed
Reviewed-on: blue/squawk#57
This commit is contained in:
commit
1aa2b5a539
@ -58,7 +58,15 @@ void Core::Archive::open(const QString& account)
|
||||
}
|
||||
|
||||
mdb_env_set_maxdbs(environment, 5);
|
||||
mdb_env_set_mapsize(environment, 512UL * 1024UL * 1024UL);
|
||||
mdb_env_set_mapsize(environment,
|
||||
#ifdef Q_OS_WIN
|
||||
// On Windows, the file is immediately allocated.
|
||||
// So we have to limit the size.
|
||||
80UL * 1024UL * 1024UL
|
||||
#else
|
||||
512UL * 1024UL * 1024UL
|
||||
#endif
|
||||
);
|
||||
mdb_env_open(environment, path.toStdString().c_str(), 0, 0664);
|
||||
|
||||
MDB_txn *txn;
|
||||
|
@ -42,7 +42,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
QApplication app(argc, argv);
|
||||
SignalCatcher sc(&app);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Windows need an organization name for QSettings to work
|
||||
// https://doc.qt.io/qt-5/qsettings.html#basic-usage
|
||||
{
|
||||
const QString& orgName = QApplication::organizationName();
|
||||
if (orgName.isNull() || orgName.isEmpty()) {
|
||||
QApplication::setOrganizationName("squawk");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
QApplication::setApplicationName("squawk");
|
||||
QApplication::setApplicationDisplayName("Squawk");
|
||||
QApplication::setApplicationVersion("0.1.5");
|
||||
|
Loading…
Reference in New Issue
Block a user