Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
80f68306
Commit
80f68306
authored
Jun 24, 2014
by
Fabio Bas
Browse files
Ported oracle to Qt5
parent
5c13c069
Changes
4
Show whitespace changes
Inline
Side-by-side
common/server_response_containers.h
View file @
80f68306
...
...
@@ -2,6 +2,7 @@
#define SERVER_RESPONSE_CONTAINERS_H
#include
<QPair>
#include
<QList>
#include
"pb/server_message.pb.h"
namespace
google
{
namespace
protobuf
{
class
Message
;
}
}
...
...
oracle/CMakeLists.txt
View file @
80f68306
...
...
@@ -36,6 +36,13 @@ if(Qt5Widgets_FOUND)
include_directories
(
${
Qt5Widgets_INCLUDE_DIRS
}
)
list
(
APPEND ORACLE_LIBS Widgets
)
# QtConcurrent
find_package
(
Qt5Concurrent
)
if
(
Qt5Concurrent_FOUND
)
include_directories
(
${
Qt5Concurrent_INCLUDE_DIRS
}
)
list
(
APPEND ORACLE_LIBS Concurrent
)
endif
()
# QtNetwork
find_package
(
Qt5Network
)
if
(
Qt5Network_FOUND
)
...
...
oracle/src/main.cpp
View file @
80f68306
...
...
@@ -9,7 +9,10 @@ int main(int argc, char *argv[])
{
QApplication
app
(
argc
,
argv
);
#if QT_VERSION < 0x050000
// gone in Qt5, all source files _MUST_ be utf8-encoded
QTextCodec
::
setCodecForCStrings
(
QTextCodec
::
codecForName
(
"UTF-8"
));
#endif
QCoreApplication
::
setOrganizationName
(
"Cockatrice"
);
QCoreApplication
::
setOrganizationDomain
(
"cockatrice"
);
...
...
oracle/src/oraclewizard.cpp
View file @
80f68306
#include
<QtGui>
#if QT_VERSION < 0x050000
#include
<QDesktopServices>
#else
#include
<QStandardPaths>
#endif
#include
<QAbstractButton>
#include
<QtConcurrent>
#include
<QCheckBox>
#include
<QFileDialog>
#include
<QGridLayout>
#include
<QDesktopServices>
#include
<QLabel>
#include
<QLineEdit>
#include
<QMessageBox>
#include
<QNetworkAccessManager>
#include
<QNetworkReply>
#include
<QProgressBar>
#include
<QPushButton>
#include
<QRadioButton>
#include
<QScrollArea>
#include
<QScrollBar>
#include
<QTextEdit>
#include
"oraclewizard.h"
#include
"oracleimporter.h"
...
...
@@ -13,7 +30,14 @@ OracleWizard::OracleWizard(QWidget *parent)
:
QWizard
(
parent
)
{
settings
=
new
QSettings
(
this
);
importer
=
new
OracleImporter
(
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
),
this
);
importer
=
new
OracleImporter
(
#if QT_VERSION < 0x050000
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
)
#else
QStandardPaths
::
standardLocations
(
QStandardPaths
::
DataLocation
).
first
()
#endif
,
this
);
addPage
(
new
IntroPage
);
addPage
(
new
LoadSetsPage
);
...
...
@@ -372,7 +396,12 @@ void SaveSetsPage::updateTotalProgress(int cardsImported, int setIndex, const QS
bool
SaveSetsPage
::
validatePage
()
{
bool
ok
=
false
;
const
QString
dataDir
=
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
);
const
QString
dataDir
=
#if QT_VERSION < 0x050000
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
);
#else
QStandardPaths
::
standardLocations
(
QStandardPaths
::
DataLocation
).
first
();
#endif
QDir
dir
(
dataDir
);
if
(
!
dir
.
exists
())
dir
.
mkpath
(
dataDir
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment