logic: Fixes for release
* Added timeout before checking new version on startscreen * Fixed size estimation in indexercommand * Fixed update title when project loading fails
This commit is contained in:
@@ -188,12 +188,6 @@ void Application::createAndLoadProject(const FilePath& projectSettingsFilePath)
|
||||
|
||||
if (m_project)
|
||||
{
|
||||
if (m_hasGUI)
|
||||
{
|
||||
updateTitle();
|
||||
m_mainView->hideStartScreen();
|
||||
}
|
||||
|
||||
m_project->load();
|
||||
}
|
||||
else
|
||||
@@ -201,6 +195,8 @@ void Application::createAndLoadProject(const FilePath& projectSettingsFilePath)
|
||||
LOG_ERROR_STREAM(<< "Failed to load project.");
|
||||
MessageStatus("Failed to load project: " + projectSettingsFilePath.str(), true).dispatch();
|
||||
}
|
||||
|
||||
updateTitle();
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
@@ -327,7 +323,7 @@ void Application::handleMessage(MessageSwitchColorScheme* message)
|
||||
|
||||
void Application::handleMessage(MessageWindowFocus* message)
|
||||
{
|
||||
if (message->focusIn && ApplicationSettings::getInstance()->getAutomaticUpdateCheck())
|
||||
if (message->focusIn && m_project && ApplicationSettings::getInstance()->getAutomaticUpdateCheck())
|
||||
{
|
||||
m_updateChecker->checkUpdate();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ IndexerCommand::~IndexerCommand()
|
||||
|
||||
size_t IndexerCommand::getByteSize() const
|
||||
{
|
||||
size_t size = m_sourceFilePath.str().size();
|
||||
size_t size = sizeof(std::string) + m_sourceFilePath.str().size();
|
||||
|
||||
for (const FilePath& path: m_indexedPaths)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QTimer>
|
||||
#include <QUrl>
|
||||
|
||||
#include "qt/network/QtUpdateChecker.h"
|
||||
@@ -27,7 +28,12 @@ QtUpdateCheckerWidget::QtUpdateCheckerWidget(QWidget* parent)
|
||||
{
|
||||
if (QtUpdateChecker::needsAutomaticCheck())
|
||||
{
|
||||
checkUpdate(false);
|
||||
QTimer::singleShot(250,
|
||||
[this]()
|
||||
{
|
||||
checkUpdate(false);
|
||||
}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user