Commit e8d8a963 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

USe nullptr when possible

parent 819add0f
......@@ -45,7 +45,7 @@ class KOPETEADDACCOUNTWIZARD_EXPORT AddAccountWizard : public KAssistantDialog
Q_OBJECT
public:
explicit AddAccountWizard( QWidget *parent = 0, bool firstRun = false );
explicit AddAccountWizard( QWidget *parent = nullptr, bool firstRun = false );
~AddAccountWizard();
/**
......
......@@ -37,7 +37,7 @@ class ChatMembersListView : public QListView
{
Q_OBJECT
public:
explicit ChatMembersListView( QWidget *parent = 0);
explicit ChatMembersListView( QWidget *parent = nullptr);
virtual ~ChatMembersListView();
public slots:
......
......@@ -53,7 +53,7 @@ class EmoticonSelector : public QWidget
public:
EmoticonSelector ( QWidget *parent = 0 );
EmoticonSelector ( QWidget *parent = nullptr );
// ~EmoticonSelector();
signals:
......
......@@ -113,7 +113,7 @@ public:
private:
// All KopeteChatWindows are created by the window function
KopeteChatWindow( Kopete::ChatSession::Form form, QWidget *parent = 0 );
KopeteChatWindow( Kopete::ChatSession::Form form, QWidget *parent = nullptr );
/**
* The window list has changed:
......
......@@ -25,7 +25,7 @@ class AccountTreeWidget : public QTreeWidget
{
Q_OBJECT
public:
AccountTreeWidget( QWidget *parent = 0 );
AccountTreeWidget( QWidget *parent = nullptr );
signals:
void itemPositionChanged();
......
......@@ -26,7 +26,7 @@ class ContactListLayoutWidget : public QWidget, private Ui::ContactListLayoutWid
{
Q_OBJECT
public:
ContactListLayoutWidget( QWidget *parent = 0 );
ContactListLayoutWidget( QWidget *parent = nullptr );
void load();
bool save();
......
......@@ -23,14 +23,14 @@
class ContactListTokenFactory : public TokenFactory
{
public:
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
};
class ContactListToken : public TokenWithLayout
{
Q_OBJECT
public:
ContactListToken( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
ContactListToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
bool small() const;
void setSmall( bool small );
......
......@@ -31,7 +31,7 @@ class TokenFactory
public:
virtual ~TokenFactory() {}
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
};
//Defines a part of a filename, drag&droppable in the TokenLayoutWidget bar from the TokenPool list.
......@@ -41,7 +41,7 @@ class Token : public QWidget
public:
explicit Token( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
explicit Token( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
QIcon icon() const;
QString iconName() const;
......
......@@ -33,7 +33,7 @@ class TokenDropTarget : public QWidget
{
Q_OBJECT
public:
explicit TokenDropTarget( const QString &mimeType, QWidget *parent = 0);
explicit TokenDropTarget( const QString &mimeType, QWidget *parent = nullptr);
QWidget *childAt( const QPoint &pos ) const;
void clear();
......
......@@ -31,7 +31,7 @@ class TokenPool : public KListWidget
Q_PROPERTY(QString mimeType READ mimeType WRITE setMimeType)
public:
TokenPool( QWidget *parent = 0 );
TokenPool( QWidget *parent = nullptr );
void addToken( Token * token );
QString mimeType() const;
......
......@@ -27,7 +27,7 @@ class QMenu;
class TokenWithLayoutFactory : public TokenFactory
{
public:
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
};
/**
......@@ -39,7 +39,7 @@ class TokenWithLayout : public Token
{
Q_OBJECT
public:
TokenWithLayout( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
TokenWithLayout( const QString &text, const QString &iconName, int value, QWidget *parent = nullptr );
~TokenWithLayout();
Qt::Alignment alignment();
......
......@@ -25,7 +25,7 @@ class BehaviorConfig_Away : public QWidget, public Ui::BehaviorConfig_Away
Q_OBJECT
public:
BehaviorConfig_Away(QWidget *parent = 0);
BehaviorConfig_Away(QWidget *parent = nullptr);
};
#endif // BEHAVIORCONFIG_AWAY_H
......@@ -27,7 +27,7 @@ class BehaviorConfig_Chat : public QWidget, public Ui::BehaviorConfig_Chat
Q_OBJECT
public:
BehaviorConfig_Chat(QWidget *parent = 0);
BehaviorConfig_Chat(QWidget *parent = nullptr);
};
#endif // BEHAVIORCONFIG_CHAT_H
......@@ -25,7 +25,7 @@ class BehaviorConfig_Events : public QWidget, public Ui::BehaviorConfig_Events
Q_OBJECT
public:
BehaviorConfig_Events(QWidget *parent = 0);
BehaviorConfig_Events(QWidget *parent = nullptr);
};
#endif // BEHAVIORCONFIG_EVENTS_H
......@@ -25,7 +25,7 @@ class BehaviorConfig_General : public QWidget, public Ui::BehaviorConfig_General
Q_OBJECT
public:
BehaviorConfig_General(QWidget *parent = 0);
BehaviorConfig_General(QWidget *parent = nullptr);
private slots:
void queueToggled(bool checked);
......
......@@ -24,7 +24,7 @@ class StatusConfig_General : public QWidget, public Ui::StatusConfig_General
Q_OBJECT
public:
StatusConfig_General(QWidget *parent = 0);
StatusConfig_General(QWidget *parent = nullptr);
};
#endif // STATUSCONFIG_GENERAL_H
......@@ -24,7 +24,7 @@ class StatusConfig_Manager : public QWidget, private Ui::StatusConfig_Manager
Q_OBJECT
public:
StatusConfig_Manager( QWidget *parent = 0 );
StatusConfig_Manager( QWidget *parent = nullptr );
~StatusConfig_Manager();
public slots:
......
......@@ -44,7 +44,7 @@ class KOPETE_CONTACT_LIST_EXPORT KabcExportWizard : public KAssistantDialog
{
Q_OBJECT
public:
KabcExportWizard( QWidget *parent = 0 );
KabcExportWizard( QWidget *parent = nullptr );
~KabcExportWizard();
public slots:
void accept();
......
......@@ -61,7 +61,7 @@ class KOPETE_CONTACT_LIST_EXPORT KopeteContactListView : public QTreeView
Q_OBJECT
public:
KopeteContactListView( QWidget *parent = 0 );
KopeteContactListView( QWidget *parent = nullptr );
~KopeteContactListView();
void initActions( KActionCollection *ac );
......
......@@ -44,7 +44,7 @@ public:
* constructor, but the easiest (and the recommended) way of calling it is by
* using the static methods @ref changeAccountIdentity()
*/
explicit AccountIdentityDialog( QWidget *parent = 0 );
explicit AccountIdentityDialog( QWidget *parent = nullptr );
~AccountIdentityDialog();
/**
......
......@@ -30,7 +30,7 @@ class KOPETE_IDENTITY_EXPORT IdentityDialog : public Kopete::UI::InfoDialog
{
Q_OBJECT
public:
explicit IdentityDialog(Kopete::Identity *identity, QWidget *parent = 0);
explicit IdentityDialog(Kopete::Identity *identity, QWidget *parent = nullptr);
~IdentityDialog();
protected slots:
......
......@@ -44,7 +44,7 @@ public:
/**
* @brief Default constructor for the identity status widget
*/
explicit IdentityStatusWidget( Kopete::Identity *ident, QWidget *parent = 0 );
explicit IdentityStatusWidget( Kopete::Identity *ident, QWidget *parent = nullptr );
~IdentityStatusWidget();
/**
......
......@@ -31,7 +31,7 @@ public:
/**
* Info event widget constructor
*/
InfoEventWidget( QWidget *parent = 0 );
InfoEventWidget( QWidget *parent = nullptr );
~InfoEventWidget();
......
......@@ -50,7 +50,7 @@ class KopeteWindow : public KXmlGuiWindow
Q_OBJECT
public:
explicit KopeteWindow ( QWidget *parent = 0 );
explicit KopeteWindow ( QWidget *parent = nullptr );
~KopeteWindow();
virtual bool eventFilter( QObject* o, QEvent* e );
......@@ -237,7 +237,7 @@ class GlobalStatusMessageIconLabel : public QLabel
{
Q_OBJECT
public:
GlobalStatusMessageIconLabel(QWidget *parent = 0);
GlobalStatusMessageIconLabel(QWidget *parent = nullptr);
protected:
void mouseReleaseEvent(QMouseEvent *event);
......@@ -251,7 +251,7 @@ class InfoEventIconLabel : public QLabel
{
Q_OBJECT
public:
InfoEventIconLabel( QWidget *parent = 0 );
InfoEventIconLabel( QWidget *parent = nullptr );
protected:
void mouseReleaseEvent( QMouseEvent *event );
......
......@@ -39,7 +39,7 @@ namespace Kopete
{
Q_OBJECT
public:
StatusEditWidget( QWidget *parent = 0 );
StatusEditWidget( QWidget *parent = nullptr );
~StatusEditWidget();
KDialogButtonBox *buttonBox() const;
......@@ -108,7 +108,7 @@ namespace Kopete
class StatusEditDialog : public KDialog
{
public:
StatusEditDialog( QWidget *parent = 0 );
StatusEditDialog( QWidget *parent = nullptr );
/**
* Returns Kopete::StatusMessage
......
......@@ -54,7 +54,7 @@ public:
* The constructor of an empty AddressBookSelectorWidget
*/
AddressBookSelectorDialog( const QString &title, const QString &message,
const QString &preSelectUid, QWidget *parent = 0L
const QString &preSelectUid, QWidget *parent = nullptr
);
/**
* The destructor of the dialog
......@@ -75,7 +75,7 @@ public:
* @returns the selected contact, or a null addressee if the user
* pressed the Cancel button. Optionally
*/
static KContacts::Addressee getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent = 0L );
static KContacts::Addressee getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent = nullptr );
protected slots:
virtual void accept();
......
......@@ -52,7 +52,7 @@ class KOPETE_EXPORT AddressBookSelectorWidget : public QWidget, private Ui::Addr
{
Q_OBJECT
public:
explicit AddressBookSelectorWidget( QWidget *parent = 0, const char *name = 0 );
explicit AddressBookSelectorWidget( QWidget *parent = nullptr, const char *name = 0 );
~AddressBookSelectorWidget();
KContacts::Addressee addressee();
/**
......
......@@ -63,7 +63,7 @@ public:
* Create a new AvatarDialog
* @param parent Parent widget
*/
AvatarDialog(QWidget *parent = 0);
AvatarDialog(QWidget *parent = nullptr);
/**
* Clean-up resource of AvatarDialog
*/
......@@ -88,7 +88,7 @@ public:
* @return The path of the selected avatar, or QString() if no avatar
* was chosen or if the Cancel button was pressed.
*/
static QString getAvatar(QWidget *parent = 0, const QString &currentAvatar = QString(), bool * ok = 0 );
static QString getAvatar(QWidget *parent = nullptr, const QString &currentAvatar = QString(), bool * ok = 0 );
Q_SIGNALS:
/**
......
......@@ -49,7 +49,7 @@ public:
* @brief Create a new AvatarSelectorWidget
* @param parent parent widget
*/
AvatarSelectorWidget(QWidget *parent = 0);
AvatarSelectorWidget(QWidget *parent = nullptr);
/**
* @brief Destructor
*/
......
......@@ -53,7 +53,7 @@ public:
* Create a new AvatarFromWebcamDialog
* @param parent Parent widget
*/
AvatarWebcamDialog(QWidget *parent = 0);
AvatarWebcamDialog(QWidget *parent = nullptr);
/**
* Clean-up resource of AvatarFromWebcamDialog
*/
......
......@@ -48,7 +48,7 @@ class ClickableLabel : public QLabel
class ArrowButton : public QAbstractButton
{
public:
ArrowButton(QWidget *parent = 0);
ArrowButton(QWidget *parent = nullptr);
~ArrowButton();
QSize sizeHint() const { return QSize(16, 16); }
......@@ -67,8 +67,8 @@ class KOPETE_EXPORT CollapsibleWidget : public QWidget
{
Q_OBJECT
public:
CollapsibleWidget(QWidget *parent = 0);
explicit CollapsibleWidget(const QString& caption, QWidget *parent = 0);
CollapsibleWidget(QWidget *parent = nullptr);
explicit CollapsibleWidget(const QString& caption, QWidget *parent = nullptr);
~CollapsibleWidget();
QString caption() const;
......@@ -108,7 +108,7 @@ class KOPETE_EXPORT SettingsContainer : public QScrollArea
Q_OBJECT
public:
enum CollapseState { Collapsed, Uncollapsed };
SettingsContainer( QWidget *parent = 0 );
SettingsContainer( QWidget *parent = nullptr );
~SettingsContainer();
CollapsibleWidget* insertWidget( QWidget* w, const QString& name );
......
......@@ -39,7 +39,7 @@ class KOPETE_EXPORT ListView : public QTreeWidget
Q_OBJECT
public:
ListView( QWidget *parent = 0 );
ListView( QWidget *parent = nullptr );
~ListView();
/**
......
......@@ -38,7 +38,7 @@ public:
* If \a listView is null then the widget will be disabled until a listview
* is set with setListView().
*/
explicit SearchLine( QWidget *parent = 0, ListView *listView = 0 );
explicit SearchLine( QWidget *parent = nullptr, ListView *listView = 0 );
/**
* Destroys the SearchLine.
*/
......
......@@ -40,14 +40,14 @@ class KOPETE_EXPORT PasswordWidget : public QWidget, public Ui::KopetePasswordWi
Q_OBJECT
public:
PasswordWidget( QWidget *parent = 0 );
PasswordWidget( QWidget *parent = nullptr );
/**
* Creates a Kopete::PasswordWidget.
* @param from The password to load the data for this widget from, or 0 if none
* @param parent The widget to nest this one inside
*/
explicit PasswordWidget( Kopete::Password *from, QWidget *parent = 0 );
explicit PasswordWidget( Kopete::Password *from, QWidget *parent = nullptr );
~PasswordWidget();
......
......@@ -39,7 +39,7 @@ class KOPETE_EXPORT MetaContactSelectorWidget : public QWidget
{
Q_OBJECT
public:
explicit MetaContactSelectorWidget( QWidget *parent = 0, const char *name = 0 );
explicit MetaContactSelectorWidget( QWidget *parent = nullptr, const char *name = 0 );
~MetaContactSelectorWidget();
Kopete::MetaContact* metaContact();
/**
......
......@@ -27,7 +27,7 @@ class BookmarksPreferences : public KCModule
{
Q_OBJECT
public:
explicit BookmarksPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit BookmarksPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~BookmarksPreferences();
......
......@@ -34,7 +34,7 @@ class AutoReplacePreferences : public KCModule
Q_OBJECT
public:
explicit AutoReplacePreferences( QWidget *parent = 0, const QVariantList &args = QVariantList() );
explicit AutoReplacePreferences( QWidget *parent = nullptr, const QVariantList &args = QVariantList() );
virtual~AutoReplacePreferences();
virtual void save();
......
......@@ -34,7 +34,7 @@ class HighlightPreferences : public KCModule {
Q_OBJECT
public:
explicit HighlightPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit HighlightPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~HighlightPreferences();
virtual void save();
......
......@@ -32,7 +32,7 @@ class LatexPreferences : public KCModule
Q_OBJECT
public:
explicit LatexPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit LatexPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~LatexPreferences();
void save();
......
......@@ -26,7 +26,7 @@ class Ui_ContactSelectorWidget_Base;
class ContactSelectorWidget : public QWidget
{
public:
ContactSelectorWidget( QWidget *parent = 0);
ContactSelectorWidget( QWidget *parent = nullptr);
~ContactSelectorWidget();
QList<AccountListEntry> contacts();
......
......@@ -32,7 +32,7 @@ class TextEffectPreferences : public KCModule {
Q_OBJECT
public:
explicit TextEffectPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit TextEffectPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~TextEffectPreferences();
// Overloaded from parent
......
......@@ -30,7 +30,7 @@ class WebPresencePreferences : public KCModule {
Q_OBJECT
public:
explicit WebPresencePreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit WebPresencePreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~WebPresencePreferences();
private:
......
......@@ -236,7 +236,7 @@ QList<QAction *> *JabberContact::customContextMenuActions ()
if( i == activeItem )
{
QAction *tmp = new QAction( this );
tmp->setIcon( KIcon("dialog-ok") );
tmp->setIcon( QIcon::fromTheme("dialog-ok") );
tmp->setText( str);
tmp->setObjectName( QString::number(i) );
connect(tmp, SIGNAL(triggered(bool)), SLOT(slotSelectResource()));
......
......@@ -26,7 +26,7 @@ class JabberXDataWidget : public QWidget
{
Q_OBJECT
public:
explicit JabberXDataWidget(const XMPP::XData &data, QWidget *parent = 0);
explicit JabberXDataWidget(const XMPP::XData &data, QWidget *parent = nullptr);
~JabberXDataWidget();
XMPP::XData::FieldList fields() const;
......
......@@ -29,7 +29,7 @@ class dlgAHCList : public KDialog
{
Q_OBJECT
public:
dlgAHCList(const XMPP::Jid &jid, XMPP::Client *client, QWidget *parent = 0);
dlgAHCList(const XMPP::Jid &jid, XMPP::Client *client, QWidget *parent = nullptr);
~dlgAHCList();
protected slots:
......
......@@ -28,7 +28,7 @@ class dlgAHCommand : public KDialog
{
Q_OBJECT
public:
dlgAHCommand(const AHCommand &r, const XMPP::Jid &jid, XMPP::Client *client, bool final = false, QWidget *parent = 0);
dlgAHCommand(const AHCommand &r, const XMPP::Jid &jid, XMPP::Client *client, bool final = false, QWidget *parent = nullptr);
~dlgAHCommand();
protected slots:
......
......@@ -26,7 +26,7 @@ class DlgJabberBookmarkEditor : public KDialog
Q_OBJECT
public:
DlgJabberBookmarkEditor( const JabberBookmark::List &bookmarks, QWidget *parent = 0 );
DlgJabberBookmarkEditor( const JabberBookmark::List &bookmarks, QWidget *parent = nullptr );
~DlgJabberBookmarkEditor();
JabberBookmark::List bookmarks() const;
......
......@@ -34,7 +34,7 @@ class DlgJabberChangePassword : public KDialog
Q_OBJECT
public:
explicit DlgJabberChangePassword ( JabberAccount *account, QWidget *parent = 0 );
explicit DlgJabberChangePassword ( JabberAccount *account, QWidget *parent = nullptr );
~DlgJabberChangePassword();
private slots:
......
......@@ -37,7 +37,7 @@ class dlgJabberServices : public QDialog
{
Q_OBJECT
public:
explicit dlgJabberServices(JabberAccount *account, QWidget *parent = 0);
explicit dlgJabberServices(JabberAccount *account, QWidget *parent = nullptr);
~dlgJabberServices ();
protected:
......
......@@ -33,7 +33,7 @@ class dlgRegister : public KDialog
{
Q_OBJECT
public:
dlgRegister(JabberAccount *account, const XMPP::Jid &jid, QWidget *parent = 0);
dlgRegister(JabberAccount *account, const XMPP::Jid &jid, QWidget *parent = nullptr);
~dlgRegister();
private slots:
......
......@@ -34,7 +34,7 @@ class dlgSearch : public QDialog
{
Q_OBJECT
public:
dlgSearch(JabberAccount *account, const XMPP::Jid &jid, QWidget *parent = 0);
dlgSearch(JabberAccount *account, const XMPP::Jid &jid, QWidget *parent = nullptr);
~dlgSearch();
private slots:
......
......@@ -26,7 +26,7 @@ class dlgXMPPConsole : public QDialog
{
Q_OBJECT
public:
explicit dlgXMPPConsole(JabberClient *client, QWidget *parent = 0);
explicit dlgXMPPConsole(JabberClient *client, QWidget *parent = nullptr);
virtual ~dlgXMPPConsole();
public slots:
......
......@@ -30,7 +30,7 @@ class AIMUserInfoDialog : public KDialog
{
Q_OBJECT
public:
AIMUserInfoDialog(Kopete::Contact *c, AIMAccount *acc, QWidget *parent = 0);
AIMUserInfoDialog(Kopete::Contact *c, AIMAccount *acc, QWidget *parent = nullptr);
~AIMUserInfoDialog();
private:
......
......@@ -40,7 +40,7 @@ public:
* @param icons The list of icons user can choose from.
* @param parent The parent of the new widget
*/
explicit EditorWithIcon( const QList<QIcon> &icons, QWidget *parent = 0 );
explicit EditorWithIcon( const QList<QIcon> &icons, QWidget *parent = nullptr );