Commit 1c9a0ce4 authored by Andrius Štikonas's avatar Andrius Štikonas

Remove KDELibs4Support.

parent f452f03a
......@@ -9,16 +9,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_D
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Completion
Config
ConfigWidgets
CoreAddons
Crash
DBusAddons
GuiAddons
I18n
KDELibs4Support
WidgetsAddons
XmlGui
)
......@@ -106,7 +102,7 @@ target_link_libraries(konquest
KF5::Crash
KF5::DBusAddons
KF5::GuiAddons
KF5::KDELibs4Support
KF5::I18n
KF5::XmlGui
KF5KDEGames
)
......
......@@ -182,7 +182,7 @@ FleetDlg::update()
// number comparison. But as all values have the same amount of
// characters/digits, sorting by string actually works.
item = new QTableWidgetItem(QString("%1").arg(KLocale::global()->formatNumber(curFleet->source->killPercentage(), 3)));
item = new QTableWidgetItem(QStringLiteral("%1").arg(curFleet->source->killPercentage(), 3, 'f', 3));
item->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
item->setFlags(Qt::ItemIsEnabled);
m_fleetTable->setItem(row, 5, item);
......
......@@ -79,7 +79,7 @@
</widget>
</item>
<item row="0" column="2">
<widget class="KIntSpinBox" name="neutralPlanetsSB">
<widget class="QSpinBox" name="neutralPlanetsSB">
<property name="minimum">
<number>0</number>
</property>
......@@ -102,7 +102,7 @@
</widget>
</item>
<item row="1" column="2">
<widget class="KIntSpinBox" name="widthSB">
<widget class="QSpinBox" name="widthSB">
<property name="minimum">
<number>4</number>
</property>
......@@ -125,7 +125,7 @@
</widget>
</item>
<item row="2" column="2">
<widget class="KIntSpinBox" name="heightSB">
<widget class="QSpinBox" name="heightSB">
<property name="minimum">
<number>4</number>
</property>
......@@ -307,11 +307,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>
<class>MiniMapView</class>
<extends>QWidget</extends>
......
......@@ -41,20 +41,21 @@
#include <KLocalizedString>
#include <KStandardGuiItem>
#include <KLineEdit>
#include <KComboBox>
#include <KConfigGroup>
#include <KSharedConfig>
#include <QComboBox>
#include <QDebug>
#include <QHeaderView>
#include <QItemDelegate>
#include <QLineEdit>
#include <QList>
#include <QDebug>
#include <QLinkedList>
#include <QPair>
#include <QMenu>
#include <QPair>
#include <QPushButton>
#include <QSignalMapper>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QVBoxLayout>
/*************************************************************************
......@@ -282,15 +283,15 @@ public:
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const
{
if (index.column() == 0)
return new KLineEdit(parent);
return new QLineEdit(parent);
else
return new KComboBox(parent);
return new QComboBox(parent);
}
void setEditorData(QWidget *editor, const QModelIndex &index) const
{
if (index.column() != 0) {
KComboBox *cbox = static_cast<KComboBox*>(editor);
QComboBox *cbox = static_cast<QComboBox*>(editor);
foreach (PlayerGui* playerGui, m_selectablePlayer) {
cbox->addItem(playerGui->guiName());
......@@ -298,7 +299,7 @@ public:
cbox->setCurrentIndex( cbox->findText(index.data( Qt::DisplayRole).toString()) );
} else {
KLineEdit *lineEdit = static_cast<KLineEdit*>(editor);
QLineEdit *lineEdit = static_cast<QLineEdit*>(editor);
lineEdit->setText(index.data(Qt::DisplayRole).toString());
}
}
......@@ -306,11 +307,11 @@ public:
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
if (index.column() != 0) {
KComboBox *cbox = static_cast<KComboBox*>(editor);
QComboBox *cbox = static_cast<QComboBox*>(editor);
model->setData(index, cbox->currentText(), Qt::EditRole);
} else {
KLineEdit *lineEdit = static_cast<KLineEdit*>(editor);
QLineEdit *lineEdit = static_cast<QLineEdit*>(editor);
model->setData(index, lineEdit->text(), Qt::EditRole);
}
......@@ -367,7 +368,7 @@ NewGameDlg::NewGameDlg( QWidget *parent, Game *game)
m_w->playerList->setModel(model);
m_w->playerList->setItemDelegate(new playersListDelegate(this, m_selectablePlayer));
m_w->playerList->header()->setResizeMode(QHeaderView::ResizeToContents);
m_w->playerList->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
m_w->addPlayerButton->setMenu(m_playerTypeChooser);
connect(m_w->neutralPlanetsSB, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateNeutrals(int)));
......
......@@ -34,8 +34,6 @@
#include <QIntValidator>
#include <QDebug>
#include <kmessagebox.h>
#include "players/player.h"
#include "players/localplayer.h"
#include "images.h"
......
......@@ -22,9 +22,9 @@
#ifndef KONQUEST_IMAGES_H
#define KONQUEST_IMAGES_H
#include <kstandarddirs.h>
#include <QStandardPaths>
#define IMAGE_SPLASH KStandardDirs::locate("appdata", "pics/konquest-splash.png")
#define IMAGES_SVG KStandardDirs::locate("appdata", "pics/default_theme.svgz")
#define IMAGE_SPLASH QStandardPaths::locate(QStandardPaths::DataLocation, "pics/konquest-splash.png")
#define IMAGES_SVG QStandardPaths::locate(QStandardPaths::DataLocation, "pics/default_theme.svgz")
#endif // KONQUEST_IMAGES_H
......@@ -148,7 +148,7 @@ Map::UniquePlanetName(void)
char c = 'A';
again:
foreach(Planet *planet, planets()) {
if (planet->name().at(0).toAscii() == c) {
if (planet->name().at(0).toLatin1() == c) {
c++;
goto again;
}
......
......@@ -28,7 +28,6 @@
#include <QBrush>
#include <QTimer>
#include <kiconloader.h>
#include <KLocalizedString>
#include <QDebug>
#include <kcolorscheme.h>
......@@ -53,7 +52,7 @@ PlanetItem::PlanetItem (MapScene *scene, Sector *sector, Game *game)
if (m_sector->planet() != NULL) {
m_lookName = QString("planet_%1").arg(m_sector->planet()->planetLook() + 1);
}
setAcceptsHoverEvents(true);
setAcceptHoverEvents(true);
m_blinkTimer = new QTimer(this);
connect(m_blinkTimer, SIGNAL(timeout()), this, SLOT(blinkPlanet()));
......
......@@ -16,6 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KLocalizedString>
#include "becai_gui.h"
#include "becai.h"
......
......@@ -16,6 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KLocalizedString>
#include "hard_gui.h"
#include "hard.h"
......
......@@ -16,6 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KLocalizedString>
#include "normal_gui.h"
#include "normal.h"
......
......@@ -16,6 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KLocalizedString>
#include "weak_gui.h"
#include "weak.h"
......
......@@ -16,6 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KLocalizedString>
#include "localplayer_gui.h"
#include "localplayer.h"
......
......@@ -22,8 +22,6 @@
#include <QColor>
#include <QString>
#include <klocale.h>
#include "player.h"
class PlayerGui
......
......@@ -16,6 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KLocalizedString>
#include "spectatorplayer_gui.h"
#include "spectatorplayer.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