Commit 584edda8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify method + use nullptr

parent f6b26af2
......@@ -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;
......
......@@ -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; }
......
......@@ -51,7 +51,7 @@ public:
bool askWhatToDo;
bool forceChoosingPath;
DownloadInfo(WebPage* p = 0) {
DownloadInfo(WebPage* p = nullptr) {
page = p;
suggestedFileName = QString();
askWhatToDo = true;
......
......@@ -26,7 +26,7 @@
class FALKON_EXPORT HistoryItem
{
public:
explicit HistoryItem(HistoryItem* parent = 0);
explicit HistoryItem(HistoryItem* parent = nullptr);
~HistoryItem();
void changeParent(HistoryItem* parent);
......
......@@ -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;
}
......
......@@ -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;
......
Supports Markdown
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