1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

const'ify method + use nullptr

This commit is contained in:
Laurent Montel 2022-06-21 13:23:40 +02:00
parent f6b26af2c7
commit 584edda88e
6 changed files with 10 additions and 10 deletions

View File

@ -29,7 +29,7 @@ class FALKON_EXPORT BookmarksItemDelegate : public QStyledItemDelegate
Q_OBJECT
public:
explicit BookmarksItemDelegate(QTreeView* parent = 0);
explicit BookmarksItemDelegate(QTreeView* parent = nullptr);
void paint(QPainter* painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;

View File

@ -43,10 +43,10 @@ class FALKON_EXPORT DownloadItem : public QWidget
public:
explicit DownloadItem(QListWidgetItem* item, QWebEngineDownloadItem* downloadItem, const QString &path, const QString &fileName, bool openFile, DownloadManager* manager);
bool isDownloading() { return m_downloading; }
bool isDownloading() const { return m_downloading; }
bool isCancelled();
QTime remainingTime() { return m_remTime; }
double currentSpeed() { return m_currSpeed; }
QTime remainingTime() const { return m_remTime; }
double currentSpeed() const { return m_currSpeed; }
int progress();
~DownloadItem();
void setDownTimer(const QTime &timer) { m_downTimer = timer; }

View File

@ -51,7 +51,7 @@ public:
bool askWhatToDo;
bool forceChoosingPath;
DownloadInfo(WebPage* p = 0) {
DownloadInfo(WebPage* p = nullptr) {
page = p;
suggestedFileName = QString();
askWhatToDo = true;

View File

@ -26,7 +26,7 @@
class FALKON_EXPORT HistoryItem
{
public:
explicit HistoryItem(HistoryItem* parent = 0);
explicit HistoryItem(HistoryItem* parent = nullptr);
~HistoryItem();
void changeParent(HistoryItem* parent);

View File

@ -22,7 +22,7 @@ QmlEngine::QmlEngine(QObject *parent)
{
}
QString QmlEngine::extensionName()
QString QmlEngine::extensionName() const
{
return m_extensionName;
}
@ -32,7 +32,7 @@ void QmlEngine::setExtensionName(const QString &name)
m_extensionName = name;
}
QString QmlEngine::extensionPath()
QString QmlEngine::extensionPath() const
{
return m_extensionPath;
}

View File

@ -24,9 +24,9 @@ class QmlEngine : public QQmlEngine
Q_OBJECT
public:
explicit QmlEngine(QObject *parent = nullptr);
QString extensionName();
QString extensionName() const;
void setExtensionName(const QString &name);
QString extensionPath();
QString extensionPath() const;
void setExtensionPath(const QString &path);
private:
QString m_extensionName;