mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 19:43:55 -07:00
Merge remote-tracking branch 'upstream/master' into local_scry_and_move
This commit is contained in:
commit
2671d6abdc
34 changed files with 12013 additions and 5621 deletions
|
|
@ -79,9 +79,9 @@ ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-s -O2")
|
set(CMAKE_CXX_FLAGS_RELEASE "-s -O2")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra -pedantic -Werror")
|
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra -Werror")
|
||||||
|
|
||||||
set(ADDITIONAL_DEBUG_FLAGS -Wcast-align -Wmissing-declarations -Winline -Wno-long-long -Wno-error=extra -Wno-error=unused-parameter -Wno-inline -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=reorder -Wno-error=missing-declarations)
|
set(ADDITIONAL_DEBUG_FLAGS -Wcast-align -Wmissing-declarations -Wno-long-long -Wno-error=extra -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=missing-declarations)
|
||||||
|
|
||||||
FOREACH(FLAG ${ADDITIONAL_DEBUG_FLAGS})
|
FOREACH(FLAG ${ADDITIONAL_DEBUG_FLAGS})
|
||||||
CHECK_CXX_COMPILER_FLAG("${FLAG}" CXX_HAS_WARNING_${FLAG})
|
CHECK_CXX_COMPILER_FLAG("${FLAG}" CXX_HAS_WARNING_${FLAG})
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,8 @@ set(cockatrice_RESOURCES cockatrice.qrc)
|
||||||
FILE(GLOB cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
|
FILE(GLOB cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
|
||||||
|
|
||||||
IF(UPDATE_TRANSLATIONS)
|
IF(UPDATE_TRANSLATIONS)
|
||||||
FILE(GLOB_RECURSE translate_cockatrice_SRCS ${CMAKE_SOURCE_DIR}/cockatrice/src/*.cpp)
|
FILE(GLOB_RECURSE translate_cockatrice_SRCS ${CMAKE_SOURCE_DIR}/cockatrice/src/*.cpp ${CMAKE_SOURCE_DIR}/cockatrice/src/*.h)
|
||||||
FILE(GLOB_RECURSE translate_common_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/common/*.cpp)
|
FILE(GLOB_RECURSE translate_common_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/common/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/common/*.h)
|
||||||
SET(translate_SRCS ${translate_cockatrice_SRCS} ${translate_common_SRCS})
|
SET(translate_SRCS ${translate_cockatrice_SRCS} ${translate_common_SRCS})
|
||||||
ENDIF(UPDATE_TRANSLATIONS)
|
ENDIF(UPDATE_TRANSLATIONS)
|
||||||
|
|
||||||
|
|
@ -269,18 +269,12 @@ if(APPLE)
|
||||||
set(plugin_dest_dir cockatrice.app/Contents/Plugins)
|
set(plugin_dest_dir cockatrice.app/Contents/Plugins)
|
||||||
set(qtconf_dest_dir cockatrice.app/Contents/Resources)
|
set(qtconf_dest_dir cockatrice.app/Contents/Resources)
|
||||||
|
|
||||||
# note: no codecs in qt5
|
# qt4: codecs, iconengines, imageformats, phonon_backend
|
||||||
# note: phonon_backend => audio | mediaservice
|
# qt5: audio, iconengines, imageformats, platforms, printsupport
|
||||||
# note: needs platform on osx
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
FILES_MATCHING REGEX "(audio|codecs|iconengines|imageformats|phonon_backend|platforms|printsupport)/.*\\.dylib"
|
||||||
FILES_MATCHING REGEX "(audio|codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug\\.dylib")
|
REGEX ".*_debug\\.dylib" EXCLUDE)
|
||||||
else()
|
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
|
||||||
FILES_MATCHING REGEX "(audio|codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*\\.dylib"
|
|
||||||
REGEX ".*_debug\\.dylib" EXCLUDE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
||||||
|
|
@ -303,17 +297,11 @@ if(WIN32)
|
||||||
set(plugin_dest_dir Plugins)
|
set(plugin_dest_dir Plugins)
|
||||||
set(qtconf_dest_dir .)
|
set(qtconf_dest_dir .)
|
||||||
|
|
||||||
# note: no codecs in qt5
|
# qt4: codecs, iconengines, imageformats, phonon_backend
|
||||||
# note: phonon_backend => audio | mediaservice
|
# qt5: audio, iconengines, imageformats, platforms, printsupport
|
||||||
# note: needs platform on osx
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
FILES_MATCHING REGEX "(audio|codecs|iconengines|imageformats|phonon_backend|platforms|printsupport)/.*[^d]\\.dll")
|
||||||
FILES_MATCHING REGEX "(audio|codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*d\\.dll")
|
|
||||||
else()
|
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
|
||||||
FILES_MATCHING REGEX "(audio|codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*[^d]\\.dll")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ static QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardSet *set)
|
||||||
}
|
}
|
||||||
|
|
||||||
CardSet::CardSet(const QString &_shortName, const QString &_longName, const QString &_setType, const QDate &_releaseDate)
|
CardSet::CardSet(const QString &_shortName, const QString &_longName, const QString &_setType, const QDate &_releaseDate)
|
||||||
: shortName(_shortName), longName(_longName), setType(_setType), releaseDate(_releaseDate)
|
: shortName(_shortName), longName(_longName), releaseDate(_releaseDate), setType(_setType)
|
||||||
{
|
{
|
||||||
updateSortKey();
|
updateSortKey();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ DlgConnect::DlgConnect(QWidget *parent)
|
||||||
|
|
||||||
void DlgConnect::passwordSaved(int state)
|
void DlgConnect::passwordSaved(int state)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(state);
|
||||||
if(savePasswordCheckBox->isChecked()) {
|
if(savePasswordCheckBox->isChecked()) {
|
||||||
autoConnectCheckBox->setEnabled(true);
|
autoConnectCheckBox->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ GeneralSettingsPage::GeneralSettingsPage()
|
||||||
picDownloadCheckBox = new QCheckBox;
|
picDownloadCheckBox = new QCheckBox;
|
||||||
picDownloadCheckBox->setChecked(settingsCache->getPicDownload());
|
picDownloadCheckBox->setChecked(settingsCache->getPicDownload());
|
||||||
|
|
||||||
QPushButton *clearDownloadedPicsButton = new QPushButton(tr("Reset/Clear Downloaded Pictures"));
|
clearDownloadedPicsButton = new QPushButton();
|
||||||
connect(clearDownloadedPicsButton, SIGNAL(clicked()), this, SLOT(clearDownloadedPicsButtonClicked()));
|
connect(clearDownloadedPicsButton, SIGNAL(clicked()), this, SLOT(clearDownloadedPicsButtonClicked()));
|
||||||
|
|
||||||
picDownloadHqCheckBox = new QCheckBox;
|
picDownloadHqCheckBox = new QCheckBox;
|
||||||
|
|
@ -227,6 +227,7 @@ void GeneralSettingsPage::retranslateUi()
|
||||||
picsPathLabel->setText(tr("Pictures directory:"));
|
picsPathLabel->setText(tr("Pictures directory:"));
|
||||||
cardDatabasePathLabel->setText(tr("Card database:"));
|
cardDatabasePathLabel->setText(tr("Card database:"));
|
||||||
tokenDatabasePathLabel->setText(tr("Token database:"));
|
tokenDatabasePathLabel->setText(tr("Token database:"));
|
||||||
|
clearDownloadedPicsButton->setText(tr("Reset/Clear Downloaded Pictures"));
|
||||||
}
|
}
|
||||||
|
|
||||||
AppearanceSettingsPage::AppearanceSettingsPage()
|
AppearanceSettingsPage::AppearanceSettingsPage()
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ private:
|
||||||
QCheckBox *picDownloadCheckBox;
|
QCheckBox *picDownloadCheckBox;
|
||||||
QCheckBox *picDownloadHqCheckBox;
|
QCheckBox *picDownloadHqCheckBox;
|
||||||
QLabel *languageLabel, *deckPathLabel, *replaysPathLabel, *picsPathLabel, *cardDatabasePathLabel, *tokenDatabasePathLabel;
|
QLabel *languageLabel, *deckPathLabel, *replaysPathLabel, *picsPathLabel, *cardDatabasePathLabel, *tokenDatabasePathLabel;
|
||||||
|
QPushButton *clearDownloadedPicsButton;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AppearanceSettingsPage : public AbstractSettingsPage {
|
class AppearanceSettingsPage : public AbstractSettingsPage {
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ public:
|
||||||
FilterTreeNode *termNode(const CardFilter *f);
|
FilterTreeNode *termNode(const CardFilter *f);
|
||||||
FilterTreeNode *attrTypeNode(CardFilter::Attr attr,
|
FilterTreeNode *attrTypeNode(CardFilter::Attr attr,
|
||||||
CardFilter::Type type);
|
CardFilter::Type type);
|
||||||
const char *textCStr() { return "root"; }
|
const char *textCStr() const { return "root"; }
|
||||||
int index() const { return 0; }
|
int index() const { return 0; }
|
||||||
|
|
||||||
bool acceptsCard(const CardInfo *info) const;
|
bool acceptsCard(const CardInfo *info) const;
|
||||||
|
|
|
||||||
|
|
@ -70,13 +70,13 @@ PlayerListWidget::PlayerListWidget(TabSupervisor *_tabSupervisor, AbstractClient
|
||||||
setMinimumHeight(60);
|
setMinimumHeight(60);
|
||||||
setIconSize(QSize(20, 15));
|
setIconSize(QSize(20, 15));
|
||||||
setColumnCount(6);
|
setColumnCount(6);
|
||||||
|
setColumnWidth(0, 20);
|
||||||
|
setColumnWidth(1, 20);
|
||||||
|
setColumnWidth(2, 20);
|
||||||
|
setColumnWidth(3, 20);
|
||||||
|
setColumnWidth(5, 20);
|
||||||
setHeaderHidden(true);
|
setHeaderHidden(true);
|
||||||
setRootIsDecorated(false);
|
setRootIsDecorated(false);
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
header()->setResizeMode(QHeaderView::ResizeToContents);
|
|
||||||
#else
|
|
||||||
header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
|
||||||
#endif
|
|
||||||
retranslateUi();
|
retranslateUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,6 +116,7 @@ void PlayerListWidget::updatePlayerProperties(const ServerInfo_PlayerProperties
|
||||||
player->setData(3, Qt::UserRole, prop.user_info().user_level());
|
player->setData(3, Qt::UserRole, prop.user_info().user_level());
|
||||||
player->setIcon(3, QIcon(UserLevelPixmapGenerator::generatePixmap(12, UserLevelFlags(prop.user_info().user_level()))));
|
player->setIcon(3, QIcon(UserLevelPixmapGenerator::generatePixmap(12, UserLevelFlags(prop.user_info().user_level()))));
|
||||||
player->setText(4, QString::fromStdString(prop.user_info().name()));
|
player->setText(4, QString::fromStdString(prop.user_info().name()));
|
||||||
|
resizeColumnToContents(4);
|
||||||
const QString country = QString::fromStdString(prop.user_info().country());
|
const QString country = QString::fromStdString(prop.user_info().country());
|
||||||
if (!country.isEmpty())
|
if (!country.isEmpty())
|
||||||
player->setIcon(4, QIcon(CountryPixmapGenerator::generatePixmap(12, country)));
|
player->setIcon(4, QIcon(CountryPixmapGenerator::generatePixmap(12, country)));
|
||||||
|
|
@ -123,8 +124,10 @@ void PlayerListWidget::updatePlayerProperties(const ServerInfo_PlayerProperties
|
||||||
}
|
}
|
||||||
if (prop.has_player_id())
|
if (prop.has_player_id())
|
||||||
player->setData(4, Qt::UserRole + 1, prop.player_id());
|
player->setData(4, Qt::UserRole + 1, prop.player_id());
|
||||||
if (prop.has_deck_hash())
|
if (prop.has_deck_hash()) {
|
||||||
player->setText(5, QString::fromStdString(prop.deck_hash()));
|
player->setText(5, QString::fromStdString(prop.deck_hash()));
|
||||||
|
resizeColumnToContents(5);
|
||||||
|
}
|
||||||
if (prop.has_sideboard_locked())
|
if (prop.has_sideboard_locked())
|
||||||
player->setIcon(5, prop.sideboard_locked() ? lockIcon : QIcon());
|
player->setIcon(5, prop.sideboard_locked() ? lockIcon : QIcon());
|
||||||
if (prop.has_ping_seconds())
|
if (prop.has_ping_seconds())
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public:
|
||||||
SetsModel(CardDatabase *_db, QObject *parent = 0);
|
SetsModel(CardDatabase *_db, QObject *parent = 0);
|
||||||
~SetsModel();
|
~SetsModel();
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const { return NUM_COLS; }
|
int columnCount(const QModelIndex &parent = QModelIndex()) const { Q_UNUSED(parent); return NUM_COLS; }
|
||||||
QVariant data(const QModelIndex &index, int role) const;
|
QVariant data(const QModelIndex &index, int role) const;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ Tab::Tab(TabSupervisor *_tabSupervisor, QWidget *parent)
|
||||||
|
|
||||||
void Tab::showCardInfoPopup(const QPoint &pos, const QString &cardName)
|
void Tab::showCardInfoPopup(const QPoint &pos, const QString &cardName)
|
||||||
{
|
{
|
||||||
|
if (infoPopup) {
|
||||||
|
infoPopup->deleteLater();
|
||||||
|
}
|
||||||
|
currentCardName = cardName;
|
||||||
infoPopup = new CardInfoWidget(CardInfoWidget::ModePopUp, cardName, 0, Qt::Widget | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint);
|
infoPopup = new CardInfoWidget(CardInfoWidget::ModePopUp, cardName, 0, Qt::Widget | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint);
|
||||||
infoPopup->setAttribute(Qt::WA_TransparentForMouseEvents);
|
infoPopup->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
QRect screenRect = qApp->desktop()->screenGeometry(this);
|
QRect screenRect = qApp->desktop()->screenGeometry(this);
|
||||||
|
|
@ -23,7 +27,7 @@ void Tab::showCardInfoPopup(const QPoint &pos, const QString &cardName)
|
||||||
void Tab::deleteCardInfoPopup(const QString &cardName)
|
void Tab::deleteCardInfoPopup(const QString &cardName)
|
||||||
{
|
{
|
||||||
if (infoPopup) {
|
if (infoPopup) {
|
||||||
if ((infoPopup->getCardName() == cardName) || (cardName == "_")) {
|
if ((currentCardName == cardName) || (cardName == "_")) {
|
||||||
infoPopup->deleteLater();
|
infoPopup->deleteLater();
|
||||||
infoPopup = 0;
|
infoPopup = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ protected slots:
|
||||||
void showCardInfoPopup(const QPoint &pos, const QString &cardName);
|
void showCardInfoPopup(const QPoint &pos, const QString &cardName);
|
||||||
void deleteCardInfoPopup(const QString &cardName);
|
void deleteCardInfoPopup(const QString &cardName);
|
||||||
private:
|
private:
|
||||||
|
QString currentCardName;
|
||||||
bool contentsChanged;
|
bool contentsChanged;
|
||||||
CardInfoWidget *infoPopup;
|
CardInfoWidget *infoPopup;
|
||||||
QList<QMenu *> tabMenus;
|
QList<QMenu *> tabMenus;
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@ void MainWindow::actAbout()
|
||||||
+ tr("Portugese (Brazil):") + " Thiago Queiroz<br>"
|
+ tr("Portugese (Brazil):") + " Thiago Queiroz<br>"
|
||||||
+ tr("French:") + " Yannick Hammer, Arnaud Faes<br>"
|
+ tr("French:") + " Yannick Hammer, Arnaud Faes<br>"
|
||||||
+ tr("Japanese:") + " Nagase Task<br>"
|
+ tr("Japanese:") + " Nagase Task<br>"
|
||||||
|
+ tr("Korean:") + " Jaeic Lee<br>"
|
||||||
+ tr("Russian:") + " Alexander Davidov<br>"
|
+ tr("Russian:") + " Alexander Davidov<br>"
|
||||||
+ tr("Italian:") + " Luigi Sciolla<br>"
|
+ tr("Italian:") + " Luigi Sciolla<br>"
|
||||||
+ tr("Swedish:") + " Jessica Dahl<br>"
|
+ tr("Swedish:") + " Jessica Dahl<br>"
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ WndSets::WndSets(QWidget *parent)
|
||||||
|
|
||||||
view->sortByColumn(SetsModel::SortKeyCol, Qt::AscendingOrder);
|
view->sortByColumn(SetsModel::SortKeyCol, Qt::AscendingOrder);
|
||||||
view->setColumnHidden(SetsModel::SortKeyCol, true);
|
view->setColumnHidden(SetsModel::SortKeyCol, true);
|
||||||
|
view->setRootIsDecorated(false);
|
||||||
|
|
||||||
saveButton = new QPushButton(tr("Save set ordering"));
|
saveButton = new QPushButton(tr("Save set ordering"));
|
||||||
connect(saveButton, SIGNAL(clicked()), this, SLOT(actSave()));
|
connect(saveButton, SIGNAL(clicked()), this, SLOT(actSave()));
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
4686
cockatrice/translations/cockatrice_ko.ts
Normal file
4686
cockatrice/translations/cockatrice_ko.ts
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -138,17 +138,12 @@ if(APPLE)
|
||||||
set(plugin_dest_dir oracle.app/Contents/Plugins)
|
set(plugin_dest_dir oracle.app/Contents/Plugins)
|
||||||
set(qtconf_dest_dir oracle.app/Contents/Resources)
|
set(qtconf_dest_dir oracle.app/Contents/Resources)
|
||||||
|
|
||||||
# note: no codecs in qt5
|
# qt4: codecs, iconengines, imageformats
|
||||||
# note: phonon_backend => mediaservice
|
# qt5: iconengines, platforms
|
||||||
# note: needs platform on osx
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
FILES_MATCHING REGEX "(codecs|iconengines|platforms)/.*\\.dylib"
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug\\.dylib")
|
REGEX ".*_debug\\.dylib" EXCLUDE)
|
||||||
else()
|
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*\\.dylib")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
||||||
|
|
@ -170,17 +165,11 @@ IF(WIN32)
|
||||||
set(plugin_dest_dir Plugins)
|
set(plugin_dest_dir Plugins)
|
||||||
set(qtconf_dest_dir .)
|
set(qtconf_dest_dir .)
|
||||||
|
|
||||||
# note: no codecs in qt5
|
# qt4: codecs, iconengines, imageformats
|
||||||
# note: phonon_backend => mediaservice
|
# qt5: iconengines, imageformats, platforms
|
||||||
# note: needs platform on osx
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
FILES_MATCHING REGEX "(codecs|iconengines|platforms)/.*[^d]\\.dll")
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*d\\.dll")
|
|
||||||
else()
|
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*[^d]\\.dll")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public:
|
||||||
bool getImport() const { return import; }
|
bool getImport() const { return import; }
|
||||||
void setImport(bool _import) { import = _import; }
|
void setImport(bool _import) { import = _import; }
|
||||||
SetToDownload(const QString &_shortName, const QString &_longName, const QVariant &_cards, bool _import, const QString &_setType = QString(), const QDate &_releaseDate = QDate())
|
SetToDownload(const QString &_shortName, const QString &_longName, const QVariant &_cards, bool _import, const QString &_setType = QString(), const QDate &_releaseDate = QDate())
|
||||||
: shortName(_shortName), longName(_longName), import(_import), cards(_cards), setType(_setType), releaseDate(_releaseDate) { }
|
: shortName(_shortName), longName(_longName), import(_import), cards(_cards), releaseDate(_releaseDate), setType(_setType) { }
|
||||||
bool operator<(const SetToDownload &set) const { return longName.compare(set.longName, Qt::CaseInsensitive) < 0; }
|
bool operator<(const SetToDownload &set) const { return longName.compare(set.longName, Qt::CaseInsensitive) < 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,17 +139,12 @@ if(APPLE)
|
||||||
set(plugin_dest_dir servatrice.app/Contents/Plugins)
|
set(plugin_dest_dir servatrice.app/Contents/Plugins)
|
||||||
set(qtconf_dest_dir servatrice.app/Contents/Resources)
|
set(qtconf_dest_dir servatrice.app/Contents/Resources)
|
||||||
|
|
||||||
# note: no codecs in qt5
|
# qt4: codecs, sqldrivers
|
||||||
# note: phonon_backend => mediaservice
|
# qt5: platforms, sqldrivers
|
||||||
# note: needs platform on osx
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
FILES_MATCHING REGEX "(codecs|platforms|sqldrivers)/.*\\.dylib"
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug\\.dylib")
|
REGEX ".*_debug\\.dylib" EXCLUDE)
|
||||||
else()
|
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*\\.dylib")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
||||||
|
|
@ -171,17 +166,11 @@ if(WIN32)
|
||||||
set(plugin_dest_dir Plugins)
|
set(plugin_dest_dir Plugins)
|
||||||
set(qtconf_dest_dir .)
|
set(qtconf_dest_dir .)
|
||||||
|
|
||||||
# note: no codecs in qt5
|
# qt4: codecs, sqldrivers
|
||||||
# note: phonon_backend => mediaservice
|
# qt5: platforms, sqldrivers
|
||||||
# note: needs platform on osx
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
FILES_MATCHING REGEX "(codecs|platforms|sqldrivers)/.*[^d]\\.dll")
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*d\\.dll")
|
|
||||||
else()
|
|
||||||
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
|
|
||||||
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*[^d]\\.dll")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,11 @@ void Servatrice_GameServer::incomingConnection(qintptr socketDescriptor)
|
||||||
QMetaObject::invokeMethod(ssi, "initConnection", Qt::QueuedConnection, Q_ARG(int, socketDescriptor));
|
QMetaObject::invokeMethod(ssi, "initConnection", Qt::QueuedConnection, Q_ARG(int, socketDescriptor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
void Servatrice_IslServer::incomingConnection(int socketDescriptor)
|
void Servatrice_IslServer::incomingConnection(int socketDescriptor)
|
||||||
|
#else
|
||||||
|
void Servatrice_IslServer::incomingConnection(qintptr socketDescriptor)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
QThread *thread = new QThread;
|
QThread *thread = new QThread;
|
||||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,11 @@ public:
|
||||||
Servatrice_IslServer(Servatrice *_server, const QSslCertificate &_cert, const QSslKey &_privateKey, QObject *parent = 0)
|
Servatrice_IslServer(Servatrice *_server, const QSslCertificate &_cert, const QSslKey &_privateKey, QObject *parent = 0)
|
||||||
: QTcpServer(parent), server(_server), cert(_cert), privateKey(_privateKey) { }
|
: QTcpServer(parent), server(_server), cert(_cert), privateKey(_privateKey) { }
|
||||||
protected:
|
protected:
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
void incomingConnection(int socketDescriptor);
|
void incomingConnection(int socketDescriptor);
|
||||||
|
#else
|
||||||
|
void incomingConnection(qintptr socketDescriptor);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class ServerProperties {
|
class ServerProperties {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue