Use more nullptr

parent 55bdaf95
......@@ -22,7 +22,7 @@ class Autoreplace_Config : public QWidget, public KonviSettingsPage, private Ui:
Q_OBJECT
public:
explicit Autoreplace_Config(QWidget* parent, const char* name=NULL);
explicit Autoreplace_Config(QWidget* parent, const char* name = nullptr);
~Autoreplace_Config() override;
void saveSettings() override;
......
......@@ -30,7 +30,7 @@ class ConnectionBehavior_Config : public QWidget, public KonviSettingsPage, priv
{
Q_OBJECT
public:
explicit ConnectionBehavior_Config(QWidget* parent = NULL);
explicit ConnectionBehavior_Config(QWidget* parent = nullptr);
void restorePageToDefaults() override;
void saveSettings() override;
......
......@@ -22,7 +22,7 @@ class NicklistBehavior_Config : public QWidget, public KonviSettingsPage, privat
Q_OBJECT
public:
explicit NicklistBehavior_Config(QWidget *parent = nullptr, const char *name = 0);
explicit NicklistBehavior_Config(QWidget *parent = nullptr, const char *name = nullptr);
~NicklistBehavior_Config();
void saveSettings() override;
......
......@@ -22,7 +22,7 @@ class QuickButtons_Config : public QWidget, public KonviSettingsPage, private Ui
Q_OBJECT
public:
explicit QuickButtons_Config(QWidget* parent, const char* name=NULL);
explicit QuickButtons_Config(QWidget* parent, const char* name=nullptr);
~QuickButtons_Config() override;
void saveSettings() override;
......
......@@ -20,7 +20,7 @@ class Tabs_Config : public QWidget, private Ui::Tabs_PreferencesUI
Q_OBJECT
public:
explicit Tabs_Config(QWidget *parent = nullptr, const char *name = 0);
explicit Tabs_Config(QWidget *parent = nullptr, const char *name = nullptr);
~Tabs_Config();
protected Q_SLOTS:
......
......@@ -26,7 +26,7 @@ class Theme_Config : public QWidget, public KonviSettingsPage, private Ui::Theme
Q_OBJECT
public:
explicit Theme_Config(QWidget* parent, const char* name=NULL);
explicit Theme_Config(QWidget* parent, const char* name = nullptr);
~Theme_Config() override;
void restorePageToDefaults() override;
......
......@@ -34,12 +34,12 @@ namespace Konversation
static QString numericalIpToTextIp( const QString& numericalIp );
// returns the self IP following the setting.
static QString getOwnIp( Server* server = 0 );
static QString getOwnIp( Server* server = nullptr );
static QString ipv6FallbackAddress(const QString& address);
// creates an instance of QTcpServer following the DCC settings
static QTcpServer* createServerSocketAndListen( QObject* parent = nullptr, QString* failedReason = 0, int minPort = 0, int maxPort = 0 );
static QTcpServer* createServerSocketAndListen( QObject* parent = nullptr, QString* failedReason = nullptr, int minPort = 0, int maxPort = 0 );
private:
DccCommon();
......
......@@ -63,7 +63,7 @@ namespace Konversation
void rawWhiteBoardCommand(const QString& command);
private:
inline QColor parseColor(const QString& colorString, bool* ok = 0);
inline QColor parseColor(const QString& colorString, bool* ok = nullptr);
inline QString colorToString(const QColor& color);
inline int fontToStyle(const QFont& font);
......
......@@ -306,7 +306,7 @@ guess_arc guess_utf8_ar[11] = {
enum JapaneseCode::Type JapaneseCode::guess_jp(const char *buf, int buflen)
{
int i;
guess_dfa *top = NULL;
guess_dfa *top = nullptr;
for (i=0; i<buflen; i++) {
int c = (unsigned char)buf[i];
......
......@@ -111,7 +111,7 @@ class Channel : public ChatWindow
protected:
// use with caution! does not check for duplicates
void fastAddNickname(ChannelNickPtr channelnick, Nick *nick=0);
void fastAddNickname(ChannelNickPtr channelnick, Nick *nick = nullptr);
void setActive(bool active);
void repositionNick(Nick *nick);
bool shouldShowEvent(ChannelNickPtr channelNick);
......
......@@ -71,7 +71,7 @@ namespace Konversation
static const QSet<QString>& supportedCommands() { return m_commands; }
QStringList splitForEncoding(const QString& destination, const QString& inputLine, int max, int segments = -1);
OutputFilterResult parse(const QString& myNick, const QString& line, const QString& destination, ChatWindow* inputContext = 0);
OutputFilterResult parse(const QString& myNick, const QString& line, const QString& destination, ChatWindow* inputContext = nullptr);
// dcc send
OutputFilterResult sendRequest(const QString &recipient, const QString &fileName, const QString &address, quint16 port,quint64 size);
......@@ -91,7 +91,7 @@ namespace Konversation
OutputFilterResult passiveChatRequest(const QString& recipient, const QString& extension, const QString& address, const QString& token);
OutputFilterResult acceptPassiveChatRequest(const QString& recipient, const QString& extension, const QString& numericalOwnIp, quint16 ownPort, const QString& token);
static bool replaceAliases(QString& line, ChatWindow* context = 0);
static bool replaceAliases(QString& line, ChatWindow* context = nullptr);
Q_SIGNALS:
void openDccSend(const QString &recipient, const QUrl& url);
......
......@@ -212,7 +212,7 @@ class Server : public QObject
Channel* getChannelByName(const QString& name);
Query* getQueryByName(const QString& name);
ChatWindow* getChannelOrQueryByName(const QString& name);
QString parseWildcards(const QString& toParse, ChatWindow* context = 0, const QStringList &nicks = QStringList());
QString parseWildcards(const QString& toParse, ChatWindow* context = nullptr, const QStringList &nicks = QStringList());
QString parseWildcards(const QString& toParse, const QString& nickname, const QString& channelName, const QString &channelKey, const QStringList &nickList, const QString& inputLineText);
QString parseWildcards(const QString& toParse, const QString& nickname, const QString& channelName, const QString &channelKey, const QString& nick, const QString& inputLineText);
......@@ -803,7 +803,7 @@ class Server : public QObject
inline QString cleanDccFileName(const QString& filename) const;
/// Checks if the port is in a valid range
inline quint16 stringToPort(const QString &port, bool *ok = 0);
inline quint16 stringToPort(const QString &port, bool *ok = nullptr);
/// Creates a list of known users and returns the one chosen by the user
inline QString recipientNick() const;
......
......@@ -29,7 +29,7 @@ class QuickConnectDialog : public QDialog
Q_OBJECT
public:
explicit QuickConnectDialog(QWidget* parent=0);
explicit QuickConnectDialog(QWidget* parent = nullptr);
~QuickConnectDialog() override;
Q_SIGNALS:
......
......@@ -49,7 +49,7 @@ namespace Konversation
void setLagLabelShown(bool shown);
void updateLagLabel(Server* lagServer, int msec);
void resetLagLabel(Server* lagServer = 0);
void resetLagLabel(Server* lagServer = nullptr);
void setTooLongLag(Server* lagServer, int msec);
void updateSSLLabel(Server* server);
......
......@@ -125,7 +125,7 @@ class ChatWindow : public QWidget
/** child classes have to override this and return true if they want the
* "insert character" item on the menu to be enabled.
*/
virtual bool isInsertSupported() { return m_inputBar != 0; }
virtual bool isInsertSupported() { return m_inputBar != nullptr; }
/** child classes have to override this and return true if they want the
* "irc color" item on the menu to be enabled.
......
......@@ -33,7 +33,7 @@ class EditNotifyDialog : public QDialog
Q_OBJECT
public:
explicit EditNotifyDialog(QWidget* parent=0, int serverGroupId=0,
explicit EditNotifyDialog(QWidget* parent = nullptr, int serverGroupId = 0,
const QString& nickname=QString());
~EditNotifyDialog() override;
......
......@@ -219,7 +219,7 @@ class IRCView : public QTextBrowser
protected:
void openLink(const QUrl &url);
QString filter(const QString& line, const QString& defaultColor, const QString& who=QString(), bool doHighlight=true, bool parseURL=true, bool self=false, QChar::Direction* direction = 0);
QString filter(const QString& line, const QString& defaultColor, const QString& who=QString(), bool doHighlight=true, bool parseURL=true, bool self=false, QChar::Direction* direction = nullptr);
void replaceDecoration(QString& line, char decoration, char replacement);
......@@ -227,7 +227,7 @@ class IRCView : public QTextBrowser
/// Returns a string where all irc-richtext chars are replaced with proper
/// html tags and all urls are parsed if parseURL is true
inline QString ircTextToHtml(const QString& text, bool parseURL, const QString& defaultColor, const QString& whoSent, bool closeAllTags = true, QChar::Direction* direction = 0);
inline QString ircTextToHtml(const QString& text, bool parseURL, const QString& defaultColor, const QString& whoSent, bool closeAllTags = true, QChar::Direction* direction = nullptr);
/// Returns a string that closes all open html tags to <parm>tag</parm>
/// The closed tag is removed from opentagList in data
......
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