small fixes

This commit is contained in:
Akash Mozumdar 2019-05-31 14:48:07 -04:00
parent 6975145db9
commit 096a1b49a7
2 changed files with 10 additions and 3 deletions

View File

@ -108,7 +108,7 @@ MainWindow::MainWindow(QWidget *parent) :
char buffer[1000] = {};
WinHttpReceiveResponse(request, NULL);
WinHttpReadData(request, buffer, 1000, &bytesRead);
if (abs(strstr(buffer, "/tag/") - strstr(buffer, CURRENT_VERSION)) > 10) Host::AddConsoleOutput(UPDATE_AVAILABLE);
if (abs(strstr(buffer, "/tag/") - strstr(buffer, VERSION)) > 10) MESSAGE(UPDATE_AVAILABLE);
}
}).detach();
}
@ -326,8 +326,7 @@ void MainWindow::Settings()
{
auto settings = new QSettings(CONFIG_FILE, QSettings::IniFormat, this);
auto layout = new QFormLayout(this);
auto save = new QPushButton(this);
save->setText(SAVE_SETTINGS);
auto save = new QPushButton(SAVE_SETTINGS, this);
layout->addWidget(save);
for (auto[value, label] : Array<std::tuple<int&, const char*>>{
{ Host::defaultCodepage, DEFAULT_CODEPAGE },

View File

@ -19,6 +19,14 @@
#include <cstdint>
#include <cassert>
#ifdef _WIN64
constexpr bool x64 = true;
#else
constexpr bool x64 = false;
#endif
#define MESSAGE(text) MessageBoxW(NULL, text, L"Textractor", MB_OK)
template <typename T> using Array = T[];
template<typename E, typename M = std::mutex>