Use kdelibs coding style
This commit is contained in:
parent
0084798a2c
commit
d965371d23
31 changed files with 201 additions and 234 deletions
|
@ -20,7 +20,8 @@
|
|||
#include "blacklistpage.h"
|
||||
#include "danboorusettings.h"
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
BlacklistPage::BlacklistPage(DanbooruSettings *preferences, QWidget *parent): QWidget(parent)
|
||||
{
|
||||
|
@ -29,10 +30,8 @@ BlacklistPage::BlacklistPage(DanbooruSettings *preferences, QWidget *parent): QW
|
|||
|
||||
}
|
||||
|
||||
|
||||
BlacklistPage::~BlacklistPage()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
} // namespace Danbooru
|
|
@ -22,11 +22,13 @@
|
|||
|
||||
#include "ui_blacklistpage.h"
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
class DanbooruSettings;
|
||||
|
||||
class BlacklistPage: public QWidget, public Ui::BlacklistPage {
|
||||
class BlacklistPage: public QWidget, public Ui::BlacklistPage
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -36,8 +38,6 @@ public:
|
|||
|
||||
};
|
||||
|
||||
|
||||
} // namespace Danbooru
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,4 +20,3 @@
|
|||
#include "danbooru_client_debug.h"
|
||||
Q_LOGGING_CATEGORY(DANBOORU_CLIENT, "org.dennogumi.danbooru_client")
|
||||
|
||||
|
||||
|
|
|
@ -89,7 +89,9 @@ DanbooruConnectWidget::DanbooruConnectWidget(QVector< QUrl > urlList,
|
|||
connect(anonCheckBox, &QCheckBox::stateChanged, this, &DanbooruConnectWidget::toggleLineEdits);
|
||||
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, this, &DanbooruConnectWidget::accept);
|
||||
connect(closeButton, &QPushButton::clicked, [this]() {Q_EMIT(rejected());} );
|
||||
connect(closeButton, &QPushButton::clicked, [this]() {
|
||||
Q_EMIT(rejected());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -155,7 +157,8 @@ void DanbooruConnectWidget::toggleLineEdits(int state)
|
|||
}
|
||||
}
|
||||
|
||||
void DanbooruConnectWidget::setBoards(const QVector<QUrl> &urlList) {
|
||||
void DanbooruConnectWidget::setBoards(const QVector<QUrl> &urlList)
|
||||
{
|
||||
|
||||
danbooruUrlComboBox->clear();
|
||||
|
||||
|
@ -212,7 +215,8 @@ void DanbooruConnectWidget::accept()
|
|||
Q_EMIT(accepted());
|
||||
}
|
||||
|
||||
bool DanbooruConnectWidget::isAnonymous() const {
|
||||
bool DanbooruConnectWidget::isAnonymous() const
|
||||
{
|
||||
|
||||
return anonCheckBox->isChecked();
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
#include <QPushButton>
|
||||
#include <QLineEdit>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
DanbooruSearchWidget::DanbooruSearchWidget(QWidget *parent): QWidget(parent)
|
||||
{
|
||||
|
@ -30,7 +31,9 @@ DanbooruSearchWidget::DanbooruSearchWidget(QWidget* parent): QWidget(parent)
|
|||
|
||||
connect(searchButton, &QPushButton::clicked, this, &DanbooruSearchWidget::accept);
|
||||
connect(tagLineEdit, &QLineEdit::returnPressed, this, &DanbooruSearchWidget::accept);
|
||||
connect(closeButton, &QPushButton::clicked, [this]() { Q_EMIT(rejected()); });
|
||||
connect(closeButton, &QPushButton::clicked, [this]() {
|
||||
Q_EMIT(rejected());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -43,7 +46,8 @@ QStringList DanbooruSearchWidget::selectedTags() const
|
|||
return m_tags;
|
||||
}
|
||||
|
||||
void DanbooruSearchWidget::accept() {
|
||||
void DanbooruSearchWidget::accept()
|
||||
{
|
||||
|
||||
if (tagLineEdit->text().isEmpty()) {
|
||||
return;
|
||||
|
@ -53,5 +57,4 @@ void DanbooruSearchWidget::accept() {
|
|||
Q_EMIT(accepted());
|
||||
}
|
||||
|
||||
|
||||
} // namespace Danbooru
|
|
@ -22,9 +22,11 @@
|
|||
|
||||
#include "ui_searchwidget.h"
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
class DanbooruSearchWidget: public QWidget, Ui::SearchWidget {
|
||||
class DanbooruSearchWidget: public QWidget, Ui::SearchWidget
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -47,5 +49,4 @@ namespace Danbooru {
|
|||
|
||||
} // namespace Danbooru
|
||||
|
||||
|
||||
#endif
|
|
@ -21,7 +21,8 @@
|
|||
#include "model/danboorutagmodel.h"
|
||||
#include "libdanbooru/danboorutag.h"
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
DanbooruTagWidget::DanbooruTagWidget(QWidget *parent): QListView(parent)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
#include <QListView>
|
||||
#include <QStringList>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
class DanbooruTag;
|
||||
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
|
||||
static QLatin1String urlRegex("(http|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?^=%&/~\\+#])?");
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
GeneralPage::GeneralPage(DanbooruSettings *preferences, QWidget *parent): QWidget(parent)
|
||||
{
|
||||
|
@ -44,5 +45,4 @@ GeneralPage::~GeneralPage()
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
} // namespace Danbooru
|
||||
|
|
|
@ -22,11 +22,13 @@
|
|||
|
||||
#include "ui_generalpage.h"
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
class DanbooruSettings;
|
||||
|
||||
class GeneralPage: public QWidget, public Ui::GeneralPage {
|
||||
class GeneralPage: public QWidget, public Ui::GeneralPage
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -17,13 +17,11 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DANBOORU_H
|
||||
#define DANBOORU_H
|
||||
|
||||
#include "libdanbooru_version.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief The Danbooru namespace.
|
||||
* @file danbooru.h
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "danboorupool.h"
|
||||
|
||||
namespace Danbooru
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DANBOORUPOOL_H
|
||||
#define DANBOORUPOOL_H
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// Qt
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
@ -48,7 +47,6 @@ DanbooruPost::DanbooruPost(QObject* parent): QObject(parent)
|
|||
m_rating = Questionable;
|
||||
}
|
||||
|
||||
|
||||
DanbooruPost::DanbooruPost(QVariantMap postData, QPixmap pixmap,
|
||||
QObject *parent):
|
||||
QObject(parent),
|
||||
|
@ -149,7 +147,6 @@ const QUrl DanbooruPost::sampleUrl() const
|
|||
return m_sampleUrl;
|
||||
}
|
||||
|
||||
|
||||
QPixmap DanbooruPost::pixmap() const
|
||||
{
|
||||
return m_pixmap;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DANBOORUPOST_H
|
||||
#define DANBOORUPOST_H
|
||||
|
||||
|
@ -90,7 +89,6 @@ public:
|
|||
Q_DECLARE_FLAGS(Ratings, DanbooruPost::Rating)
|
||||
Q_ENUMS(Rating)
|
||||
|
||||
|
||||
private:
|
||||
|
||||
QPixmap m_pixmap;
|
||||
|
@ -227,6 +225,5 @@ Q_DECLARE_METATYPE(Danbooru::DanbooruPost *)
|
|||
Q_DECLARE_METATYPE(Danbooru::DanbooruPost::Rating)
|
||||
Q_DECLARE_METATYPE(QSet<QString>)
|
||||
|
||||
|
||||
#endif // DANBOORUPOST_H
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// STL
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -100,7 +99,6 @@ void DanbooruService::getPostList()
|
|||
|
||||
}
|
||||
|
||||
|
||||
void DanbooruService::getTagList(int limit, QString name)
|
||||
{
|
||||
QMap<QString, QString> parameters;
|
||||
|
@ -237,7 +235,6 @@ void DanbooruService::getRelatedTags(const QStringList &tags,
|
|||
|
||||
// qCDebug(LIBDANBOORU) << "Final constructed related tag URL" << danbooruUrl;
|
||||
|
||||
|
||||
StoredTransferJob *job = KIO::storedGet(
|
||||
danbooruUrl, KIO::NoReload,
|
||||
KIO::HideProgressInfo
|
||||
|
@ -291,7 +288,6 @@ void DanbooruService::getRelatedTags(const QStringList &tags,
|
|||
|
||||
}
|
||||
|
||||
|
||||
const QSet< QString > DanbooruService::blacklist() const
|
||||
{
|
||||
return m_blacklist;
|
||||
|
@ -322,7 +318,6 @@ int DanbooruService::currentPage() const
|
|||
return m_currentPage;
|
||||
}
|
||||
|
||||
|
||||
const DanbooruPost::Ratings DanbooruService::maximumAllowedRating() const
|
||||
{
|
||||
|
||||
|
@ -347,7 +342,6 @@ void DanbooruService::nextPoolPage()
|
|||
getPoolList();
|
||||
}
|
||||
|
||||
|
||||
QStringList DanbooruService::postTags() const
|
||||
{
|
||||
return m_tags;
|
||||
|
@ -362,7 +356,8 @@ void DanbooruService::reset()
|
|||
|
||||
// Slots
|
||||
|
||||
void DanbooruService::processTagList(KJob *job) {
|
||||
void DanbooruService::processTagList(KJob *job)
|
||||
{
|
||||
|
||||
if (job->error()) {
|
||||
Q_EMIT(downloadError(job->errorString()));
|
||||
|
@ -437,7 +432,6 @@ void DanbooruService::processPostList(KJob *job)
|
|||
|
||||
for (auto element : postList) {
|
||||
|
||||
|
||||
QVariantMap map = element.toMap();
|
||||
DanbooruPost *post = new DanbooruPost(map);
|
||||
|
||||
|
@ -469,7 +463,6 @@ void DanbooruService::processPostList(KJob *job)
|
|||
StoredTransferJob *pixmapJob = KIO::storedGet(post->thumbnailUrl(),
|
||||
KIO::NoReload, KIO::HideProgressInfo);
|
||||
|
||||
|
||||
// We don't want to overload the servers, so set some rational
|
||||
// priority
|
||||
|
||||
|
@ -523,7 +516,6 @@ void DanbooruService::processPostList(KJob *job)
|
|||
|
||||
}
|
||||
|
||||
|
||||
void DanbooruService::downloadAllTags(KJob *job)
|
||||
{
|
||||
Q_UNUSED(job)
|
||||
|
@ -608,13 +600,15 @@ void DanbooruService::setImageCache(KImageCache* cache)
|
|||
m_cache = cache;
|
||||
}
|
||||
|
||||
void DanbooruService::setMaxPosts(int number) {
|
||||
void DanbooruService::setMaxPosts(int number)
|
||||
{
|
||||
|
||||
m_maxPosts = number < 100 ? number : 100;
|
||||
|
||||
}
|
||||
|
||||
void DanbooruService::setCurrentPage(int page) {
|
||||
void DanbooruService::setCurrentPage(int page)
|
||||
{
|
||||
m_currentPage = page;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DANBOORUSERVICE_H
|
||||
#define DANBOORUSERVICE_H
|
||||
|
||||
|
@ -102,7 +101,6 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
|
||||
/**
|
||||
* @brief Construct a default instance of the service.
|
||||
*
|
||||
|
@ -284,7 +282,6 @@ public:
|
|||
|
||||
void setPostTags(const QStringList &tags);
|
||||
|
||||
|
||||
private Q_SLOTS:
|
||||
void processPostList(KJob *job);
|
||||
void processTagList(KJob *job);
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "danboorutag.h"
|
||||
|
||||
namespace Danbooru
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DANBOORUTAG_H
|
||||
#define DANBOORUTAG_H
|
||||
|
||||
|
@ -78,5 +77,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(TagTypes)
|
|||
|
||||
Q_DECLARE_METATYPE(Danbooru::DanbooruTag *)
|
||||
|
||||
|
||||
#endif // DANBOORUTAG_H
|
||||
|
|
|
@ -20,4 +20,3 @@
|
|||
#include "libdanbooru_debug.h"
|
||||
Q_LOGGING_CATEGORY(LIBDANBOORU, "org.dennogumi.libdanbooru")
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// Own
|
||||
|
||||
#include "utils.h"
|
||||
|
@ -69,7 +68,6 @@ QUrl requestUrl(QUrl &url, const QString &path,
|
|||
danbooruUrl.setPassword(password);
|
||||
}
|
||||
|
||||
|
||||
return danbooruUrl;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
|
|
|
@ -108,7 +108,6 @@ DanbooruMainWindow::DanbooruMainWindow(QWidget *parent)
|
|||
m_tableView->setModel(m_poolModel);
|
||||
m_tagWidget->setModel(m_proxyModel);
|
||||
|
||||
|
||||
// Set up declarative bindings for the QQuickWidget
|
||||
|
||||
m_view->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
|
@ -216,8 +215,8 @@ DanbooruMainWindow::DanbooruMainWindow(QWidget *parent)
|
|||
|
||||
});
|
||||
|
||||
connect(m_view->rootObject(), SIGNAL(downloadRequested(const QUrl&, QVariant)), this,
|
||||
SLOT(slotHandleDownload(const QUrl&, QVariant)));
|
||||
connect(m_view->rootObject(), SIGNAL(downloadRequested(QUrl,QVariant)), this,
|
||||
SLOT(slotHandleDownload(QUrl,QVariant)));
|
||||
|
||||
connect(m_tagWidget, &QListView::doubleClicked, this, &DanbooruMainWindow::searchTag);
|
||||
|
||||
|
@ -261,7 +260,6 @@ void DanbooruMainWindow::loadSettings()
|
|||
|
||||
}
|
||||
|
||||
|
||||
void DanbooruMainWindow::setupActions()
|
||||
{
|
||||
|
||||
|
@ -329,7 +327,6 @@ void DanbooruMainWindow::setupActions()
|
|||
actionCollection()->action(QLatin1String("morePools"))->setEnabled(true);
|
||||
m_tableView->show();
|
||||
|
||||
|
||||
} else {
|
||||
poolDockWidget->hide();
|
||||
actionCollection()->action(QLatin1String("morePools"))->setEnabled(false);
|
||||
|
@ -382,8 +379,8 @@ void DanbooruMainWindow::setupActions()
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
void DanbooruMainWindow::setupDockWidgets() {
|
||||
void DanbooruMainWindow::setupDockWidgets()
|
||||
{
|
||||
|
||||
// Set up PoolWidget
|
||||
|
||||
|
@ -459,7 +456,6 @@ void DanbooruMainWindow::downloadPosts()
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
handlePostDownload(QStringList(), false);
|
||||
|
||||
}
|
||||
|
@ -477,8 +473,8 @@ void DanbooruMainWindow::optionsPreferences()
|
|||
dialog->show();
|
||||
}
|
||||
|
||||
void DanbooruMainWindow::slotHandleDownload(const QUrl &url, const QVariant tags) {
|
||||
|
||||
void DanbooruMainWindow::slotHandleDownload(const QUrl &url, const QVariant tags)
|
||||
{
|
||||
|
||||
QStringList tagList = tags.toStringList();
|
||||
|
||||
|
@ -506,7 +502,6 @@ void DanbooruMainWindow::slotHandleDownload(const QUrl &url, const QVariant tags
|
|||
|
||||
);
|
||||
|
||||
|
||||
// TODO: Remember last user directory - settings?
|
||||
|
||||
if (!localFile.isEmpty()) {
|
||||
|
@ -554,7 +549,6 @@ void DanbooruMainWindow::clearModels()
|
|||
|
||||
}
|
||||
|
||||
|
||||
void DanbooruMainWindow::handlePostDownload(const QStringList &tags, bool relatedTags)
|
||||
{
|
||||
clearModels();
|
||||
|
|
|
@ -32,12 +32,9 @@
|
|||
#include <KSharedDataCache>
|
||||
#include <KImageCache>
|
||||
|
||||
|
||||
|
||||
class QQuickWidget;
|
||||
class QSortFilterProxyModel;
|
||||
|
||||
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
|
|
|
@ -24,14 +24,16 @@
|
|||
|
||||
#include <KLocalizedString>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
DanbooruPoolModel::DanbooruPoolModel(QObject *parent): QAbstractTableModel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
const QStringList DanbooruPoolModel::m_headerNames = { i18n("ID"),
|
||||
i18n("Name"), i18n("Posts"), i18n("Description") };
|
||||
i18n("Name"), i18n("Posts"), i18n("Description")
|
||||
};
|
||||
|
||||
DanbooruPoolModel::~DanbooruPoolModel()
|
||||
{
|
||||
|
@ -120,6 +122,4 @@ DanbooruPool* DanbooruPoolModel::poolAt(int index) const
|
|||
return m_items.at(index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace Danbooru
|
|
@ -23,7 +23,8 @@
|
|||
#include <QVector>
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
class DanbooruPool;
|
||||
|
||||
|
@ -42,7 +43,6 @@ public:
|
|||
void clear();
|
||||
DanbooruPool *poolAt(int index) const;
|
||||
|
||||
|
||||
private:
|
||||
QVector<DanbooruPool *> m_items;
|
||||
static const QStringList m_headerNames;
|
||||
|
@ -52,9 +52,6 @@ public Q_SLOTS:
|
|||
|
||||
};
|
||||
|
||||
|
||||
} // namespace Danbooru
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// Own
|
||||
|
||||
#include "danboorupostmodel.h"
|
||||
|
@ -81,16 +80,14 @@ QVariant DanbooruPostModel::data(const QModelIndex &index, int role) const
|
|||
}
|
||||
|
||||
switch (role) {
|
||||
case Qt::DisplayRole:
|
||||
{
|
||||
case Qt::DisplayRole: {
|
||||
QVariant variant;
|
||||
variant.setValue(post);
|
||||
|
||||
return variant;
|
||||
}
|
||||
|
||||
case Qt::DecorationRole:
|
||||
{
|
||||
case Qt::DecorationRole: {
|
||||
const QPixmap pixmap = post->pixmap();
|
||||
return pixmap;
|
||||
}
|
||||
|
@ -106,8 +103,7 @@ QVariant DanbooruPostModel::data(const QModelIndex &index, int role) const
|
|||
return QSize(post->width(), post->height());
|
||||
case RatingRole:
|
||||
return post->rating();
|
||||
case TagRole:
|
||||
{
|
||||
case TagRole: {
|
||||
QStringList tagList = post->tags().toList();
|
||||
return tagList;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DANBOORUPOSTMODEL_H
|
||||
#define DANBOORUPOSTMODEL_H
|
||||
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
* along with Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "danboorutagmodel.h"
|
||||
#include "libdanbooru/danboorutag.h"
|
||||
#include "danbooru_client_debug.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
DanbooruTagModel::DanbooruTagModel(QObject *parent): QAbstractListModel(parent)
|
||||
{
|
||||
|
@ -38,7 +38,6 @@ DanbooruTagModel::~DanbooruTagModel()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
int DanbooruTagModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
@ -86,7 +85,8 @@ void DanbooruTagModel::addTag(DanbooruTag* tag)
|
|||
endInsertRows();
|
||||
}
|
||||
|
||||
void DanbooruTagModel::clear() {
|
||||
void DanbooruTagModel::clear()
|
||||
{
|
||||
|
||||
if (m_items.isEmpty()) {
|
||||
return;
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
#include <QAbstractListModel>
|
||||
#include <QVector>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
class DanbooruTag;
|
||||
|
||||
|
@ -53,7 +54,6 @@ public Q_SLOTS:
|
|||
|
||||
};
|
||||
|
||||
|
||||
} // namespace Danbooru
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue