diff --git a/src/filefetchjob.h b/src/filefetchjob.h index 99cc2bb..04d1d67 100644 --- a/src/filefetchjob.h +++ b/src/filefetchjob.h @@ -1,48 +1,48 @@ /* * * Copyright (C) 2014 Vishesh Handa * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef BALOO_FILEFETCHJOB_H #define BALOO_FILEFETCHJOB_H #include #include namespace Baloo { class FileFetchJob : public KJob { Q_OBJECT public: - FileFetchJob(const QStringList& urls, QObject* parent = nullptr); + explicit FileFetchJob(const QStringList& urls, QObject* parent = nullptr); QList data() const; void start() override; private Q_SLOTS: void doStart(); private: QStringList m_urls; QList m_data; }; } #endif // BALOO_FILEFETCHJOB_H diff --git a/src/indexeddataretriever.h b/src/indexeddataretriever.h index 6171dc6..286ac1e 100644 --- a/src/indexeddataretriever.h +++ b/src/indexeddataretriever.h @@ -1,52 +1,52 @@ /* * * Copyright (C) 2012 Vishesh Handa * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef INDEXEDDATARETRIEVER_H #define INDEXEDDATARETRIEVER_H #include #include #include namespace Baloo { class IndexedDataRetriever : public KJob { Q_OBJECT public: - IndexedDataRetriever(const QString& fileUrl, QObject* parent = nullptr); + explicit IndexedDataRetriever(const QString& fileUrl, QObject* parent = nullptr); ~IndexedDataRetriever() override; void start() override; QVariantMap data() const; private Q_SLOTS: void slotIndexedFile(int error); private: QString m_url; QProcess* m_process; QVariantMap m_data; }; } #endif // INDEXEDDATARETRIEVER_H diff --git a/src/kblocklayout.h b/src/kblocklayout.h index 578fdb4..cf9b262 100644 --- a/src/kblocklayout.h +++ b/src/kblocklayout.h @@ -1,76 +1,76 @@ /* * This file is part of the Baloo KDE project. * Copyright (C) 2006-2007 Sebastian Trueg * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ /* KBlockLayout is based on the FlowLayout example from QT4. Copyright (C) 2004-2006 Trolltech ASA. All rights reserved. */ #ifndef KBLOCKLAYOUT_H #define KBLOCKLAYOUT_H #include #include /** * The KBlockLayout arranges widget in rows and columns like a text * editor does. */ class KBlockLayout : public QLayout { public: explicit KBlockLayout( QWidget *parent, int margin = 0, int hSpacing = -1, int vSpacing = -1 ); - KBlockLayout( int margin = 0, int hSpacing = -1, int vSpacing = -1 ); + explicit KBlockLayout( int margin = 0, int hSpacing = -1, int vSpacing = -1 ); ~KBlockLayout() override; /** * Set the alignment to use. It can be a combination of a horizontal and * a vertical alignment flag. The vertical flag is used to arrange widgets * that do not fill the complete height of a row. * * The default alignment is Qt::AlignLeft|Qt::AlignTop */ void setAlignment( Qt::Alignment ); Qt::Alignment alignment() const; int horizontalSpacing() const; int verticalSpacing() const; void setSpacing( int h, int v ); void addItem( QLayoutItem* item ) override; Qt::Orientations expandingDirections() const override; bool hasHeightForWidth() const override; int heightForWidth(int) const override; int count() const override; QLayoutItem* itemAt( int index ) const override; QSize minimumSize() const override; void setGeometry( const QRect& rect ) override; QSize sizeHint() const override; QLayoutItem* takeAt( int index ) override; private: int doLayout( const QRect& rect, bool testOnly ) const; class Private; Private* const d; }; #endif diff --git a/src/kedittagsdialog_p.h b/src/kedittagsdialog_p.h index 709b24e..b2f6a61 100644 --- a/src/kedittagsdialog_p.h +++ b/src/kedittagsdialog_p.h @@ -1,71 +1,71 @@ /* * Copyright (C) 2009 by Peter Penz * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #ifndef KEDIT_TAGS_DIALOG_H #define KEDIT_TAGS_DIALOG_H #include class QLineEdit; class KJob; class QTreeWidget; class QTreeWidgetItem; class QPushButton; class QTimer; /** * @brief Dialog to edit a list of Baloo tags. * * It is possible for the user to add existing tags, * create new tags or to remove tags. * * @see KMetaDataConfigurationDialog */ class KEditTagsDialog : public QDialog { Q_OBJECT public: - KEditTagsDialog(const QStringList& tags, - QWidget* parent = nullptr); + explicit KEditTagsDialog(const QStringList& tags, + QWidget* parent = nullptr); ~KEditTagsDialog() override; QStringList tags() const; private Q_SLOTS: void slotTextEdited(const QString& text); void slotAcceptedButtonClicked(); void slotItemActivated(const QTreeWidgetItem* item, int column); private: void loadTagWidget(); void modifyTagWidget(const QString& tag); private: QHash m_allTagTreeItems; QStringList m_tags; QStringList m_allTags; QString m_newTag; QTreeWidget* m_tagTree; QLineEdit* m_newTagEdit; }; #endif diff --git a/src/tagcheckbox.h b/src/tagcheckbox.h index 8963a8e..825bae1 100644 --- a/src/tagcheckbox.h +++ b/src/tagcheckbox.h @@ -1,64 +1,64 @@ /* This file is part of the Baloo KDE project. Copyright (C) 2010 Sebastian Trueg This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #ifndef _BALOO_TAG_CHECKBOX_H_ #define _BALOO_TAG_CHECKBOX_H_ #include #include "tagwidget_p.h" class QMouseEvent; class QLabel; namespace Baloo { class TagCheckBox : public QWidget { Q_OBJECT public: - TagCheckBox(const QString& tag, QWidget* parent = nullptr); + explicit TagCheckBox(const QString& tag, QWidget* parent = nullptr); ~TagCheckBox() override; QString tag() const { return m_tag; } Q_SIGNALS: void tagClicked(const QString& tag); protected: void leaveEvent(QEvent* event ) override; bool eventFilter(QObject* watched, QEvent* event) override; private: QRect tagRect() const; void enableUrlHover( bool enabled ); // two modes: checkbox and simple label QLabel* m_label; QWidget* m_child; QString m_tag; bool m_urlHover; }; } #endif