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

Use nullptr here too

This commit is contained in:
Laurent Montel 2022-06-18 08:53:33 +02:00
parent d6c4035ff6
commit ba459ba600
65 changed files with 72 additions and 72 deletions

View File

@ -92,7 +92,7 @@ public:
SelectAll = 8
};
LineEdit(QWidget* parent = 0);
LineEdit(QWidget* parent = nullptr);
void addWidget(QWidget* widget, WidgetPosition position);
void removeWidget(QWidget* widget);
@ -152,7 +152,7 @@ Q_SIGNALS:
void sizeHintChanged();
public:
SideWidget(QWidget* parent = 0);
SideWidget(QWidget* parent = nullptr);
protected:
bool event(QEvent* event) override;

View File

@ -42,7 +42,7 @@ class FALKON_EXPORT SqueezeLabelV1 : public QLabel
Q_OBJECT
public:
SqueezeLabelV1(QWidget* parent = 0);
SqueezeLabelV1(QWidget* parent = nullptr);
protected:
void paintEvent(QPaintEvent* event) override;

View File

@ -33,7 +33,7 @@ class FALKON_EXPORT AdBlockAddSubscriptionDialog : public QDialog
Q_OBJECT
public:
explicit AdBlockAddSubscriptionDialog(QWidget* parent = 0);
explicit AdBlockAddSubscriptionDialog(QWidget* parent = nullptr);
~AdBlockAddSubscriptionDialog();
QString title() const;

View File

@ -28,7 +28,7 @@ class FALKON_EXPORT AdBlockTreeWidget : public TreeWidget
{
Q_OBJECT
public:
explicit AdBlockTreeWidget(AdBlockSubscription* subscription, QWidget* parent = 0);
explicit AdBlockTreeWidget(AdBlockSubscription* subscription, QWidget* parent = nullptr);
AdBlockSubscription* subscription() const;

View File

@ -36,7 +36,7 @@ class FALKON_EXPORT MainMenu : public QMenu
Q_OBJECT
public:
explicit MainMenu(BrowserWindow* window, QWidget* parent = 0);
explicit MainMenu(BrowserWindow* window, QWidget* parent = nullptr);
void initMenuBar(QMenuBar* menuBar) const;

View File

@ -101,7 +101,7 @@ class MasterPasswordDialog : public QDialog
Q_OBJECT
public:
explicit MasterPasswordDialog(DatabaseEncryptedPasswordBackend* backend, QWidget* parent = 0);
explicit MasterPasswordDialog(DatabaseEncryptedPasswordBackend* backend, QWidget* parent = nullptr);
~MasterPasswordDialog();
void delayedExec();
@ -128,7 +128,7 @@ class AskMasterPassword : public QDialog
Q_OBJECT
public:
explicit AskMasterPassword(DatabaseEncryptedPasswordBackend* backend, QWidget* parent = 0);
explicit AskMasterPassword(DatabaseEncryptedPasswordBackend* backend, QWidget* parent = nullptr);
private Q_SLOTS:
void verifyPassword();

View File

@ -34,7 +34,7 @@ class FALKON_EXPORT BookmarksExportDialog : public QDialog
Q_OBJECT
public:
explicit BookmarksExportDialog(QWidget* parent = 0);
explicit BookmarksExportDialog(QWidget* parent = nullptr);
~BookmarksExportDialog();
private Q_SLOTS:

View File

@ -30,7 +30,7 @@ class FALKON_EXPORT BookmarksIcon : public ClickableLabel
{
Q_OBJECT
public:
explicit BookmarksIcon(QWidget* parent = 0);
explicit BookmarksIcon(QWidget* parent = nullptr);
void setWebView(WebView* view);
void checkBookmark(const QUrl &url, bool forceCheck = false);

View File

@ -36,7 +36,7 @@ class FALKON_EXPORT BookmarksImportDialog : public QDialog
Q_OBJECT
public:
explicit BookmarksImportDialog(QWidget* parent = 0);
explicit BookmarksImportDialog(QWidget* parent = nullptr);
~BookmarksImportDialog();
private Q_SLOTS:

View File

@ -39,7 +39,7 @@ class FALKON_EXPORT BookmarksManager : public QWidget
Q_OBJECT
public:
explicit BookmarksManager(BrowserWindow* window, QWidget* parent = 0);
explicit BookmarksManager(BrowserWindow* window, QWidget* parent = nullptr);
~BookmarksManager();
void setMainWindow(BrowserWindow* window);

View File

@ -31,7 +31,7 @@ class FALKON_EXPORT BookmarksMenu : public Menu
Q_OBJECT
public:
explicit BookmarksMenu(QWidget* parent = 0);
explicit BookmarksMenu(QWidget* parent = nullptr);
void setMainWindow(BrowserWindow* window);

View File

@ -34,7 +34,7 @@ class FALKON_EXPORT BookmarksToolbar : public QWidget
{
Q_OBJECT
public:
explicit BookmarksToolbar(BrowserWindow* window, QWidget* parent = 0);
explicit BookmarksToolbar(BrowserWindow* window, QWidget* parent = nullptr);
private Q_SLOTS:
void contextMenuRequested(const QPoint &pos);

View File

@ -31,7 +31,7 @@ class FALKON_EXPORT BookmarksToolbarButton : public QPushButton
Q_OBJECT
public:
explicit BookmarksToolbarButton(BookmarkItem* bookmark, QWidget* parent = 0);
explicit BookmarksToolbarButton(BookmarkItem* bookmark, QWidget* parent = nullptr);
BookmarkItem* bookmark() const;
void setMainWindow(BrowserWindow* window);

View File

@ -31,7 +31,7 @@ class FALKON_EXPORT BookmarksFoldersMenu : public QMenu
Q_OBJECT
public:
explicit BookmarksFoldersMenu(QWidget* parent = 0);
explicit BookmarksFoldersMenu(QWidget* parent = nullptr);
BookmarkItem* selectedFolder() const;

View File

@ -37,7 +37,7 @@ public:
BookmarksSidebarViewType
};
explicit BookmarksTreeView(QWidget* parent = 0);
explicit BookmarksTreeView(QWidget* parent = nullptr);
ViewType viewType() const;
void setViewType(ViewType type);

View File

@ -37,7 +37,7 @@ class FALKON_EXPORT BookmarksWidget : public LocationBarPopup
{
Q_OBJECT
public:
explicit BookmarksWidget(WebView* view, BookmarkItem* bookmark, QWidget* parent = 0);
explicit BookmarksWidget(WebView* view, BookmarkItem* bookmark, QWidget* parent = nullptr);
~BookmarksWidget();
private Q_SLOTS:

View File

@ -59,7 +59,7 @@ public:
}
};
explicit DownloadManager(QWidget* parent = 0);
explicit DownloadManager(QWidget* parent = nullptr);
~DownloadManager();
void loadSettings();

View File

@ -36,7 +36,7 @@ class FALKON_EXPORT DownloadOptionsDialog : public QDialog
Q_OBJECT
public:
explicit DownloadOptionsDialog(const QString &fileName, QWebEngineDownloadItem *downloadItem, QWidget* parent = 0);
explicit DownloadOptionsDialog(const QString &fileName, QWebEngineDownloadItem *downloadItem, QWidget* parent = nullptr);
~DownloadOptionsDialog();
void showExternalManagerOption(bool show);

View File

@ -38,7 +38,7 @@ class FALKON_EXPORT HistoryManager : public QWidget
Q_OBJECT
public:
explicit HistoryManager(BrowserWindow* window, QWidget* parent = 0);
explicit HistoryManager(BrowserWindow* window, QWidget* parent = nullptr);
~HistoryManager();
void setMainWindow(BrowserWindow* window);

View File

@ -30,7 +30,7 @@ class FALKON_EXPORT HistoryMenu : public Menu
Q_OBJECT
public:
explicit HistoryMenu(QWidget* parent = 0);
explicit HistoryMenu(QWidget* parent = nullptr);
void setMainWindow(BrowserWindow* window);

View File

@ -33,7 +33,7 @@ public:
HistorySidebarViewType
};
explicit HistoryTreeView(QWidget* parent = 0);
explicit HistoryTreeView(QWidget* parent = nullptr);
ViewType viewType() const;
void setViewType(ViewType type);

View File

@ -24,7 +24,7 @@
class FALKON_EXPORT DownIcon : public ClickableLabel
{
public:
explicit DownIcon(QWidget* parent = 0);
explicit DownIcon(QWidget* parent = nullptr);
private:
void contextMenuEvent(QContextMenuEvent* ev) override;

View File

@ -24,7 +24,7 @@
class FALKON_EXPORT GoIcon : public ClickableLabel
{
public:
explicit GoIcon(QWidget* parent = 0);
explicit GoIcon(QWidget* parent = nullptr);
private:
void contextMenuEvent(QContextMenuEvent* ev) override;

View File

@ -29,7 +29,7 @@ class TabBar;
class FALKON_EXPORT NavigationContainer : public QWidget
{
public:
explicit NavigationContainer(QWidget* parent = 0);
explicit NavigationContainer(QWidget* parent = nullptr);
void addWidget(QWidget* widget);
void setTabBar(TabBar* tabBar);

View File

@ -28,7 +28,7 @@ class FALKON_EXPORT ReloadStopButton : public ToolButton
Q_OBJECT
public:
explicit ReloadStopButton(QWidget* parent = 0);
explicit ReloadStopButton(QWidget* parent = nullptr);
void showStopButton();
void showReloadButton();

View File

@ -38,7 +38,7 @@ class OpenSearchEngine;
class FALKON_EXPORT WebSearchBar_Button : public ClickableLabel
{
public:
explicit WebSearchBar_Button(QWidget* parent = 0);
explicit WebSearchBar_Button(QWidget* parent = nullptr);
private:
void contextMenuEvent(QContextMenuEvent* event) override;

View File

@ -36,7 +36,7 @@ class FALKON_EXPORT SslErrorDialog : public QDialog
public:
enum Result { Yes, No, OnlyForThisSession, NoForThisSession };
explicit SslErrorDialog(QWidget* parent = 0);
explicit SslErrorDialog(QWidget* parent = nullptr);
~SslErrorDialog();
void setText(const QString &text);

View File

@ -31,7 +31,7 @@ class FALKON_EXPORT EditSearchEngine : public QDialog
{
Q_OBJECT
public:
explicit EditSearchEngine(const QString &title, QWidget* parent = 0);
explicit EditSearchEngine(const QString &title, QWidget* parent = nullptr);
void setName(const QString &name);
void setUrl(const QString &url);

View File

@ -35,7 +35,7 @@ class FALKON_EXPORT SearchEnginesDialog : public QDialog
Q_OBJECT
public:
explicit SearchEnginesDialog(QWidget* parent = 0);
explicit SearchEnginesDialog(QWidget* parent = nullptr);
~SearchEnginesDialog();
public Q_SLOTS:

View File

@ -32,7 +32,7 @@ class FALKON_EXPORT AboutDialog : public QDialog
Q_OBJECT
public:
explicit AboutDialog(QWidget* parent = 0);
explicit AboutDialog(QWidget* parent = nullptr);
~AboutDialog();
private Q_SLOTS:

View File

@ -35,7 +35,7 @@ class FALKON_EXPORT BrowsingLibrary : public QWidget
Q_OBJECT
public:
explicit BrowsingLibrary(BrowserWindow* window, QWidget* parent = 0);
explicit BrowsingLibrary(BrowserWindow* window, QWidget* parent = nullptr);
~BrowsingLibrary();
void showHistory(BrowserWindow* window);

View File

@ -27,7 +27,7 @@ class FALKON_EXPORT CheckBoxDialog : public QMessageBox
{
Q_OBJECT
public:
explicit CheckBoxDialog(const QMessageBox::StandardButtons &buttons, QWidget* parent = 0);
explicit CheckBoxDialog(const QMessageBox::StandardButtons &buttons, QWidget* parent = nullptr);
void setCheckBoxText(const QString &text);

View File

@ -31,7 +31,7 @@ class FALKON_EXPORT ClearPrivateData : public QDialog
{
Q_OBJECT
public:
explicit ClearPrivateData(QWidget* parent = 0);
explicit ClearPrivateData(QWidget* parent = nullptr);
static void clearLocalStorage();
static void clearWebDatabases();

View File

@ -35,7 +35,7 @@ class FALKON_EXPORT IconChooser : public QDialog
Q_OBJECT
public:
explicit IconChooser(QWidget* parent = 0);
explicit IconChooser(QWidget* parent = nullptr);
~IconChooser();
QIcon getIcon();
@ -51,7 +51,7 @@ private:
class FALKON_EXPORT IconChooserDelegate : public QStyledItemDelegate
{
public:
explicit IconChooserDelegate(QWidget* parent = 0);
explicit IconChooserDelegate(QWidget* parent = nullptr);
void paint(QPainter* painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;

View File

@ -29,7 +29,7 @@ class FALKON_EXPORT LicenseViewer : public QWidget
Q_OBJECT
public:
explicit LicenseViewer(QWidget* parent = 0);
explicit LicenseViewer(QWidget* parent = nullptr);
void setLicenseFile(const QString &fileName);
void setText(const QString &text);

View File

@ -34,7 +34,7 @@ class FALKON_EXPORT SiteInfoWidget : public LocationBarPopup
{
Q_OBJECT
public:
explicit SiteInfoWidget(BrowserWindow* window, QWidget* parent = 0);
explicit SiteInfoWidget(BrowserWindow* window, QWidget* parent = nullptr);
~SiteInfoWidget();
private:

View File

@ -27,7 +27,7 @@
class FALKON_EXPORT PopupSiteIcon : public QWidget
{
public:
explicit PopupSiteIcon(QWidget* parent = 0) : QWidget(parent) { }
explicit PopupSiteIcon(QWidget* parent = nullptr) : QWidget(parent) { }
void setIcon(const QIcon &icon) {
m_icon = QIcon(icon.pixmap(16));
update();

View File

@ -36,7 +36,7 @@ class FALKON_EXPORT PopupLocationBar : public LineEdit
Q_PROPERTY(int fixedheight READ height WRITE setFixedHeight)
public:
explicit PopupLocationBar(QWidget* parent = 0);
explicit PopupLocationBar(QWidget* parent = nullptr);
void setView(PopupWebView* view);

View File

@ -31,7 +31,7 @@ class FALKON_EXPORT PopupWebView : public WebView
{
Q_OBJECT
public:
explicit PopupWebView(QWidget* parent = 0);
explicit PopupWebView(QWidget* parent = nullptr);
QWidget* overlayWidget() override;
void loadInNewTab(const LoadRequest &req, Qz::NewTabPositionFlags position) override;

View File

@ -33,7 +33,7 @@ class FALKON_EXPORT AcceptLanguage : public QDialog
Q_OBJECT
public:
explicit AcceptLanguage(QWidget* parent = 0);
explicit AcceptLanguage(QWidget* parent = nullptr);
~AcceptLanguage();
static QStringList defaultLanguage();

View File

@ -34,7 +34,7 @@ class FALKON_EXPORT AutoFillManager : public QWidget
Q_OBJECT
public:
explicit AutoFillManager(QWidget* parent = 0);
explicit AutoFillManager(QWidget* parent = nullptr);
~AutoFillManager();
void showExceptions();

View File

@ -33,7 +33,7 @@ class FALKON_EXPORT JsOptions : public QDialog
Q_OBJECT
public:
explicit JsOptions(QWidget* parent = 0);
explicit JsOptions(QWidget* parent = nullptr);
~JsOptions();
public Q_SLOTS:

View File

@ -34,7 +34,7 @@ class FALKON_EXPORT PluginsManager : public QWidget
Q_OBJECT
public:
explicit PluginsManager(QWidget* parent = 0);
explicit PluginsManager(QWidget* parent = nullptr);
~PluginsManager();
void load();

View File

@ -35,7 +35,7 @@ class FALKON_EXPORT UserAgentDialog : public QDialog
Q_OBJECT
public:
explicit UserAgentDialog(QWidget* parent = 0);
explicit UserAgentDialog(QWidget* parent = nullptr);
~UserAgentDialog();
private Q_SLOTS:

View File

@ -36,7 +36,7 @@ class FALKON_EXPORT BookmarksSidebar : public QWidget
Q_OBJECT
public:
explicit BookmarksSidebar(BrowserWindow* window, QWidget* parent = 0);
explicit BookmarksSidebar(BrowserWindow* window, QWidget* parent = nullptr);
~BookmarksSidebar();
private Q_SLOTS:

View File

@ -35,7 +35,7 @@ class FALKON_EXPORT HistorySideBar : public QWidget
Q_OBJECT
public:
explicit HistorySideBar(BrowserWindow* window, QWidget* parent = 0);
explicit HistorySideBar(BrowserWindow* window, QWidget* parent = nullptr);
~HistorySideBar();
private Q_SLOTS:

View File

@ -57,7 +57,7 @@ public:
AfterTab
};
explicit ComboTabBar(QWidget* parent = 0);
explicit ComboTabBar(QWidget* parent = nullptr);
int addTab(const QString &text);
int addTab(const QIcon &icon, const QString &text);
@ -296,7 +296,7 @@ class FALKON_EXPORT TabScrollBar : public QScrollBar
{
Q_OBJECT
public:
explicit TabScrollBar(QWidget* parent = 0);
explicit TabScrollBar(QWidget* parent = nullptr);
~TabScrollBar();
bool isScrolling() const;
@ -312,7 +312,7 @@ class FALKON_EXPORT TabBarScrollWidget : public QWidget
{
Q_OBJECT
public:
explicit TabBarScrollWidget(QTabBar* tabBar, QWidget* parent = 0);
explicit TabBarScrollWidget(QTabBar* tabBar, QWidget* parent = nullptr);
QTabBar* tabBar();
QScrollArea* scrollArea();

View File

@ -39,7 +39,7 @@ public:
QPixmap audioPlayingPixmap;
QPixmap audioMutedPixmap;
};
explicit TabIcon(QWidget* parent = 0);
explicit TabIcon(QWidget* parent = nullptr);
void setWebTab(WebTab* tab);
void updateIcon();

View File

@ -33,7 +33,7 @@ class FALKON_EXPORT TabStackedWidget : public QWidget
{
Q_OBJECT
public:
explicit TabStackedWidget(QWidget* parent = 0);
explicit TabStackedWidget(QWidget* parent = nullptr);
~TabStackedWidget();
ComboTabBar* tabBar();

View File

@ -53,7 +53,7 @@ class FALKON_EXPORT MenuTabs : public QMenu
{
Q_OBJECT
public:
explicit MenuTabs(QWidget* parent = 0) : QMenu(parent) {}
explicit MenuTabs(QWidget* parent = nullptr) : QMenu(parent) {}
Q_SIGNALS:
void closeTab(int);

View File

@ -30,7 +30,7 @@ class FALKON_EXPORT AnimatedWidget : public QWidget
public:
enum Direction { Down, Up };
explicit AnimatedWidget(const Direction &direction = Down, int duration = 300, QWidget* parent = 0);
explicit AnimatedWidget(const Direction &direction = Down, int duration = 300, QWidget* parent = nullptr);
QWidget* widget() { return m_widget; }

View File

@ -53,7 +53,7 @@ public:
}
};
explicit ButtonWithMenu(QWidget* parent = 0);
explicit ButtonWithMenu(QWidget* parent = nullptr);
~ButtonWithMenu();
void addItem(const Item &item);

View File

@ -32,7 +32,7 @@ class QSslCertificate;
class FALKON_EXPORT CertificateInfoWidget : public QWidget
{
public:
explicit CertificateInfoWidget(const QSslCertificate &cert, QWidget* parent = 0);
explicit CertificateInfoWidget(const QSslCertificate &cert, QWidget* parent = nullptr);
~CertificateInfoWidget();
// Qt5 compatibility

View File

@ -35,7 +35,7 @@ class FALKON_EXPORT ClickableLabel : public QLabel
Q_PROPERTY(QIcon fallbackIcon READ fallbackIcon WRITE setFallbackIcon)
public:
explicit ClickableLabel(QWidget* parent = 0);
explicit ClickableLabel(QWidget* parent = nullptr);
QString themeIcon() const;
void setThemeIcon(const QString &name);

View File

@ -26,7 +26,7 @@
class FALKON_EXPORT DockTitleBarWidget : public QWidget, public Ui_DockTitleBarWidget
{
public:
explicit DockTitleBarWidget(const QString &title, QWidget* parent = 0);
explicit DockTitleBarWidget(const QString &title, QWidget* parent = nullptr);
~DockTitleBarWidget();
void setTitle(const QString &title);

View File

@ -29,8 +29,8 @@ class FALKON_EXPORT Menu : public QMenu
{
Q_OBJECT
public:
explicit Menu(QWidget* parent = 0);
explicit Menu(const QString &title, QWidget* parent = 0);
explicit Menu(QWidget* parent = nullptr);
explicit Menu(const QString &title, QWidget* parent = nullptr);
// Default is false, menu will NOT be closed on middle click
bool closeOnMiddleClick() const;

View File

@ -26,7 +26,7 @@ class FALKON_EXPORT FocusSelectLineEdit : public QLineEdit
{
Q_OBJECT
public:
explicit FocusSelectLineEdit(QWidget* parent = 0);
explicit FocusSelectLineEdit(QWidget* parent = nullptr);
public Q_SLOTS:
void setFocus();

View File

@ -23,7 +23,7 @@
class HorizontalListWidget : public QListWidget
{
public:
explicit HorizontalListWidget(QWidget* parent = 0);
explicit HorizontalListWidget(QWidget* parent = nullptr);
private:
void mousePressEvent(QMouseEvent* event) override;

View File

@ -32,7 +32,7 @@ class HTML5PermissionsDialog : public QDialog
Q_OBJECT
public:
explicit HTML5PermissionsDialog(QWidget* parent = 0);
explicit HTML5PermissionsDialog(QWidget* parent = nullptr);
~HTML5PermissionsDialog();
void showFeaturePermissions(QWebEnginePage::Feature feature);

View File

@ -30,7 +30,7 @@ class FALKON_EXPORT MacToolButton : public QPushButton
Q_PROPERTY(bool autoRaise READ autoRaise WRITE setAutoRaise)
public:
explicit MacToolButton(QWidget* parent = 0);
explicit MacToolButton(QWidget* parent = nullptr);
void setIconSize(const QSize &size);
@ -49,7 +49,7 @@ class FALKON_EXPORT MacToolButton : public QToolButton
Q_OBJECT
public:
explicit MacToolButton(QWidget* parent = 0);
explicit MacToolButton(QWidget* parent = nullptr);
};
#endif
#endif // MACTOOLBUTTON_H

View File

@ -28,7 +28,7 @@ class FALKON_EXPORT ProgressBar : public QWidget
{
Q_OBJECT
public:
explicit ProgressBar(QWidget* parent = 0);
explicit ProgressBar(QWidget* parent = nullptr);
public Q_SLOTS:
void setValue(int value);

View File

@ -36,7 +36,7 @@ class FALKON_EXPORT ToolButton : public QToolButton
Q_PROPERTY(QIcon fallbackIcon READ fallbackIcon WRITE setFallbackIcon)
public:
explicit ToolButton(QWidget* parent = 0);
explicit ToolButton(QWidget* parent = nullptr);
// MultiIcon - Image containing pixmaps for all button states
QImage multiIcon() const;

View File

@ -26,7 +26,7 @@ class FALKON_EXPORT TreeWidget : public QTreeWidget
{
Q_OBJECT
public:
explicit TreeWidget(QWidget* parent = 0);
explicit TreeWidget(QWidget* parent = nullptr);
enum ItemShowMode { ItemsCollapsed = 0, ItemsExpanded = 1 };
ItemShowMode defaultItemShowMode() { return m_showMode; }
void setDefaultItemShowMode(ItemShowMode mode) { m_showMode = mode; }

View File

@ -34,7 +34,7 @@ class FALKON_EXPORT WebView : public QWebEngineView
Q_OBJECT
public:
explicit WebView(QWidget* parent = 0);
explicit WebView(QWidget* parent = nullptr);
~WebView();
QIcon icon(bool allowNull = false) const;

View File

@ -39,7 +39,7 @@ class FALKON_EXPORT SearchToolBar : public QWidget
{
Q_OBJECT
public:
explicit SearchToolBar(WebView* view, QWidget* parent = 0);
explicit SearchToolBar(WebView* view, QWidget* parent = nullptr);
~SearchToolBar();
void showMinimalInPopupWindow();