Commit 8709cb8e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without kdelibs4support

parent 6b337e54
......@@ -20,7 +20,7 @@ find_package(KF5 REQUIRED COMPONENTS
XmlGui
KIO
NotifyConfig
KDELibs4Support)
)
find_package(KF5KDEGames 4.9.0 REQUIRED)
......
......@@ -10,6 +10,7 @@ set(ksquares_SRCS
ksquaresdemowindow.cpp
themegraphicsitems.cpp
highlightanimation.cpp
scoresdialog.cpp
)
include_directories(${CMAKE_SOURCE_DIR}/libKF5KDEGames/highscore)
......@@ -21,7 +22,7 @@ kconfig_add_kcfg_files(ksquares_SRCS GENERATE_MOC settings.kcfgc) #GENERATE_MOC
#kde4_add_app_icon(ksquares_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-apps-ksquares.png")
add_executable(ksquares ${ksquares_SRCS})
target_link_libraries(ksquares KF5KDEGames KF5::KDELibs4Support KF5::DBusAddons)
target_link_libraries(ksquares KF5KDEGames KF5::I18n KF5::XmlGui KF5::Completion KF5::DBusAddons)
install(TARGETS ksquares ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -207,9 +207,7 @@ void KSquaresWindow::gameOver(const QVector<KSquaresPlayer> &_playerList)
//m_scene->displayScoreTable(playerList);
ScoresDialog scoresDialog(this);
scoresDialog.setButtons(KDialog::Close);
scoresDialog.setDefaultButton(KDialog::Close);
scoresDialog.setCaption(i18n("Scores"));
scoresDialog.setWindowTitle(i18n("Scores"));
QStandardItemModel* scoreTableModel = new QStandardItemModel(&scoresDialog);
scoreTableModel->setRowCount(playerList.size());
......
/***************************************************************************
* Copyright (C) 2006 by Matthew Williams <matt@milliams.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "scoresdialog.h"
#include <QDialogButtonBox>
#include <QPushButton>
ScoresDialog::ScoresDialog(QWidget* parent)
: QDialog(parent)
{
QVBoxLayout *topLayout = new QVBoxLayout;
setLayout(topLayout);
QWidget *w = new QWidget;
topLayout->addWidget(w);
QVBoxLayout *mainLayout = new QVBoxLayout;
w->setLayout(mainLayout);
QWidget *mainWidget = new QWidget;
setupUi(mainWidget);
mainLayout->addWidget(mainWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
mainLayout->addWidget(buttonBox);
}
......@@ -12,12 +12,12 @@
#include "ui_scoreswidget.h"
#include <kdialog.h>
#include <QDialog>
class ScoresDialog : public KDialog, public Ui::ScoresWidget
class ScoresDialog : public QDialog, public Ui::ScoresWidget
{
public:
explicit ScoresDialog(QWidget* parent = 0) : KDialog(parent) {setupUi(mainWidget());}
explicit ScoresDialog(QWidget* parent = 0);
};
#endif // SCORESDIALOG_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment