Commit 11e0618f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Initialize pointer

parent a4b5c0f1
......@@ -132,24 +132,24 @@ private:
// one-time functions
void setupActions();
KGet * m_kget;
KGet * m_kget = nullptr;
// internal widgets
ViewsContainer * m_viewsContainer;
ViewsContainer * m_viewsContainer = nullptr;
// separated widgets
DropTarget * m_drop;
Tray * m_dock;
DropTarget * m_drop = nullptr;
Tray * m_dock = nullptr;
// actions
KToggleAction * m_autoPasteAction;
KToggleAction * m_menubarAction;
KToggleAction * m_konquerorIntegration;
KToggleAction * m_autoPasteAction = nullptr;
KToggleAction * m_menubarAction = nullptr;
KToggleAction * m_konquerorIntegration = nullptr;
// for autopaste function
QString lastClipboard;
// timer for checking clipboard - autopaste function
QTimer *clipboardTimer;
QTimer *clipboardTimer = nullptr;
bool m_startWithoutAnimation;
bool m_doTesting; // UnitTest flag
......
......@@ -69,14 +69,14 @@ private slots:
void slotClose();
private:
QMenu * popupMenu;
MainWindow * parentWidget;
QTimer * animTimer;
QTimer * popupTimer;
QMenu * popupMenu = nullptr;
MainWindow * parentWidget = nullptr;
QTimer * animTimer = nullptr;
QTimer * popupTimer = nullptr;
QPixmap cachedPixmap;
QAction * pop_sticky;
QAction * pop_show;
QAction * pop_sticky = nullptr;
QAction * pop_show = nullptr;
QPoint position;
......
......@@ -29,7 +29,7 @@ class GroupSettingsDialog : public KGetSaveSizeDialog
void save();
private:
TransferGroupHandler* m_group;
TransferGroupHandler* m_group = nullptr;
Ui::GroupSettingsDialog ui;
};
......
......@@ -32,7 +32,7 @@ class RangeTreeWidget::Range
public:
Range()
{
};
}
bool check(const QVariant &data) const
{
......
......@@ -26,7 +26,7 @@ TransferHistoryCategorizedView::TransferHistoryCategorizedView(QWidget *parent)
: QWidget(parent)
{
// the widget layout
QGridLayout *layout = new QGridLayout();
QGridLayout *layout = new QGridLayout(this);
// initialize the model
m_model = new QStandardItemModel();
......@@ -54,7 +54,6 @@ TransferHistoryCategorizedView::TransferHistoryCategorizedView(QWidget *parent)
connect(item_delegate, &TransferHistoryItemDelegate::deletedTransfer, this, &TransferHistoryCategorizedView::deletedTransfer);
connect(m_view, &KCategorizedView::doubleClicked, this, &TransferHistoryCategorizedView::doubleClicked);
setLayout(layout);
}
TransferHistoryCategorizedView::~TransferHistoryCategorizedView()
......
......@@ -68,7 +68,7 @@ class DateConstruct
class UrlText
{
public:
UrlText() {};
UrlText() {}
bool isEmpty() const {return name.isEmpty() && url.isEmpty();}
......
......@@ -58,10 +58,10 @@ class UrlWidget : public QObject
void slotRemoveMirror();
private:
KGetMetalink::Resources *m_resources;
MirrorModel *m_mirrorModel;
MirrorProxyModel *m_proxy;
QSortFilterProxyModel *m_countrySort;
KGetMetalink::Resources *m_resources = nullptr;
MirrorModel *m_mirrorModel = nullptr;
MirrorProxyModel *m_proxy = nullptr;
QSortFilterProxyModel *m_countrySort = nullptr;
QPointer<QWidget> m_widget;
Ui::UrlWidget ui;
};
......
......@@ -43,7 +43,7 @@ class MirrorDelegate : public QStyledItemDelegate
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
private:
QSortFilterProxyModel *m_countrySort;
QSortFilterProxyModel *m_countrySort = nullptr;
};
class MirrorProxyModel : public QSortFilterProxyModel
......
......@@ -57,8 +57,8 @@ class MirrorAddDlg : public QDialog
private:
Ui::MirrorAddDlg ui;
MirrorModel *m_model;
QSortFilterProxyModel *m_countryModel;
MirrorModel *m_model = nullptr;
QSortFilterProxyModel *m_countryModel = nullptr;
};
class MirrorSettings : public KGetSaveSizeDialog
......@@ -77,10 +77,10 @@ class MirrorSettings : public KGetSaveSizeDialog
void save();
private:
TransferHandler *m_transfer;
TransferHandler *m_transfer = nullptr;
QUrl m_file;
MirrorModel *m_model;
MirrorProxyModel *m_proxy;
MirrorModel *m_model = nullptr;
MirrorProxyModel *m_proxy = nullptr;
Ui::MirrorSettings ui;
};
......
......@@ -49,8 +49,8 @@ class SignatureDlg : public KGetSaveSizeDialog
private:
Ui::SignatureDlg ui;
Signature *m_signature;
FileModel *m_fileModel;
Signature *m_signature = nullptr;
FileModel *m_fileModel = nullptr;
QModelIndex m_file;
static const QStringList OWNERTRUST;
};
......
......@@ -33,9 +33,9 @@ class TransferDetails : public QWidget
void slotTransferChanged(TransferHandler * transfer, TransferHandler::ChangesFlags flags);
private:
TransferHandler * m_transfer;
QVBoxLayout * m_layout;
QWidget * m_genericWidget;
TransferHandler * m_transfer = nullptr;
QVBoxLayout * m_layout = nullptr;
QWidget * m_genericWidget = nullptr;
Ui::TransferDetailsFrm frm;
};
......
......@@ -28,8 +28,7 @@
TransferSettingsDialog::TransferSettingsDialog(QWidget *parent, TransferHandler *transfer)
: KGetSaveSizeDialog("TransferSettingsDialog", parent),
m_transfer(transfer),
m_model(m_transfer->fileModel()),
m_proxy(nullptr)
m_model(m_transfer->fileModel())
{
setWindowTitle(i18n("Transfer Settings for %1", m_transfer->source().fileName()));
......
......@@ -39,9 +39,9 @@ class TransferSettingsDialog : public KGetSaveSizeDialog
void save();
private:
TransferHandler *m_transfer;
FileModel *m_model;
QSortFilterProxyModel *m_proxy;
TransferHandler *m_transfer = nullptr;
FileModel *m_model = nullptr;
QSortFilterProxyModel *m_proxy = nullptr;
Ui::TransferSettingsDialog ui;
};
......
......@@ -53,7 +53,7 @@ class TransfersView : public QTreeView
QWidget *getDetailsWidgetForTransfer(TransferHandler *handler);
QList<QModelIndex> m_editingIndexes;
QMenu *m_headerMenu;
QMenu *m_headerMenu = nullptr;
};
#endif
......@@ -47,7 +47,7 @@ class VerificationAddDlg : public QDialog
private:
Ui::VerificationAddDlg ui;
VerificationModel *m_model;
VerificationModel *m_model = nullptr;
QHash<QString, int> m_diggestLength;
};
......@@ -70,11 +70,11 @@ class VerificationDialog : public KGetSaveSizeDialog
void slotFinished();
private:
TransferHandler *m_transfer;
Verifier *m_verifier;
VerificationModel *m_model;
QSortFilterProxyModel *m_proxy;
FileModel *m_fileModel;
TransferHandler *m_transfer = nullptr;
Verifier *m_verifier = nullptr;
VerificationModel *m_model = nullptr;
QSortFilterProxyModel *m_proxy = nullptr;
FileModel *m_fileModel = nullptr;
QModelIndex m_file;
Ui::VerificationDialog ui;
};
......
......@@ -31,7 +31,7 @@ class ViewsContainer : public QWidget
void selectAll();
private:
TransfersView * m_transfersView;
TransfersView * m_transfersView = nullptr;
};
#endif
Markdown is supported
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