Plasma Engine
2.0
Loading...
Searching...
No Matches
CheckVersion.moc.h
1
#pragma once
2
3
#include <EditorFramework/EditorFrameworkDLL.h>
4
5
#include <Foundation/Strings/String.h>
6
7
#include <Foundation/Types/UniquePtr.h>
8
#include <QObject>
9
#include <QProcess>
10
11
class
PageDownloader
:
public
QObject
12
{
13
Q_OBJECT
14
15
public
:
16
explicit
PageDownloader
(
const
QString& sUrl);
17
18
plStringView
GetDownloadedData()
const
{
return
m_sDownloadedPage; }
19
20
signals:
21
void
FinishedDownload();
22
23
private
slots:
24
void
DownloadDone(
int
exitCode, QProcess::ExitStatus exitStatus);
25
26
private
:
27
plUniquePtr<QProcess>
m_pProcess;
28
plStringBuilder
m_sDownloadedPage;
29
};
30
32
class
plQtVersionChecker
:
public
QObject
33
{
34
Q_OBJECT
35
36
public
:
37
plQtVersionChecker
();
38
39
void
Initialize();
40
41
bool
Check(
bool
bForce);
42
43
const
char
* GetOwnVersion()
const
;
44
const
char
* GetKnownLatestVersion()
const
;
45
46
bool
IsLatestNewer()
const
;
47
48
Q_SIGNALS:
49
void
VersionCheckCompleted(
bool
bNewRelease,
bool
bForced);
50
51
private
slots:
52
void
PageDownloaded();
53
54
plResult
StoreKnownVersion();
55
56
private
:
57
bool
m_bRequireOnlineCheck =
true
;
58
bool
m_bForceCheck =
false
;
59
bool
m_bCheckInProgresss =
false
;
60
plString
m_sConfigFile;
61
plString
m_sKnownLatestVersion;
62
plUniquePtr<PageDownloader>
m_pVersionPage;
63
};
PageDownloader
Definition
CheckVersion.moc.h:12
plQtVersionChecker
Downloads a web page and checks whether the latest version online is newer than the current one.
Definition
CheckVersion.moc.h:33
plStringBuilder
plStringBuilder is a class that is meant for creating and modifying strings.
Definition
StringBuilder.h:35
plStringView
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition
StringView.h:34
plUniquePtr
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition
UniquePtr.h:10
plHybridString< 32, plDefaultAllocatorWrapper >
plResult
Default enum for returning failure or success, instead of using a bool.
Definition
Types.h:54
Code
Editor
EditorFramework
EditorApp
CheckVersion.moc.h
Generated by
1.11.0