switched std::optional to boost::optional

This commit is contained in:
fourtf
2019-08-25 22:58:19 +02:00
parent 84c7c40e86
commit 6cb82307e6
3 changed files with 145 additions and 3 deletions
+18
View File
@@ -9,6 +9,7 @@
#include "common/NetworkManager.hpp"
#include "singletons/Paths.hpp"
#include "singletons/Updates.hpp"
#include "util/CombinePath.hpp"
#include "widgets/dialogs/LastRunCrashDialog.hpp"
#ifdef USEWINSDK
@@ -113,6 +114,23 @@ void runGui(QApplication &a, Paths &paths, Settings &settings)
{
initQt();
auto thread = std::thread([dir = paths.miscDirectory] {
{
auto path = combinePath(dir, "Update.exe");
if (QFile::exists(path))
{
QFile::remove(path);
}
}
{
auto path = combinePath(dir, "update.zip");
if (QFile::exists(path))
{
QFile::remove(path);
}
}
});
chatterino::NetworkManager::init();
chatterino::Updates::getInstance().checkForUpdates();
+3 -3
View File
@@ -26,9 +26,9 @@
#include <QMessageBox>
#include <QSaveFile>
#include <QScreen>
#include <boost/optional.hpp>
#include <chrono>
#include <optional>
#define SETTINGS_FILENAME "/window-layout.json"
@@ -44,9 +44,9 @@ namespace {
return windows_arr;
}
std::optional<bool> &shouldMoveOutOfBoundsWindow()
boost::optional<bool> &shouldMoveOutOfBoundsWindow()
{
static std::optional<bool> x;
static boost::optional<bool> x;
return x;
}
} // namespace