src/dcc/*: mark methods const when possible and semantically sensible

parent c97d7ee7
......@@ -57,7 +57,7 @@ QList<QUrl> DccFileDialog::getOpenUrls(const QUrl &startDir, const QString& filt
return m_fileWidget->selectedUrls();
}
bool DccFileDialog::passiveSend()
bool DccFileDialog::passiveSend() const
{
return m_checkBox->isChecked();
}
......
......@@ -27,7 +27,7 @@ public:
QList<QUrl> getOpenUrls(const QUrl &startDir = QUrl(), const QString& filter = QString(), const QString& caption = QString());
bool passiveSend();
bool passiveSend() const;
QSize sizeHint() const override;
......
......@@ -82,7 +82,7 @@ namespace Konversation
KWindowConfig::saveWindowSize(windowHandle(), config);
}
QString RecipientDialog::getSelectedNickname()
QString RecipientDialog::getSelectedNickname() const
{
return selectedNickname;
}
......
......@@ -47,7 +47,7 @@ namespace Konversation
void slotCancel();
protected:
QString getSelectedNickname();
QString getSelectedNickname() const;
static QString selectedNickname;
KLineEdit* nicknameInput;
......
......@@ -409,7 +409,7 @@ namespace Konversation
m_upnpRouter = router;
}
UPnPRouter* TransferManager::getUPnPRouter()
UPnPRouter* TransferManager::getUPnPRouter() const
{
return m_upnpRouter;
}
......
......@@ -90,7 +90,7 @@ namespace Konversation
bool hasActiveTransfers() const;
bool hasActiveChats() const;
UPnP::UPnPRouter *getUPnPRouter();
UPnP::UPnPRouter *getUPnPRouter() const;
void startupUPnP(void);
void shutdownUPnP(void);
......
......@@ -502,7 +502,7 @@ namespace Konversation
{
}
TransferView *TransferPanel::getTransferView()
TransferView *TransferPanel::getTransferView() const
{
return m_transferView;
}
......
......@@ -47,7 +47,7 @@ namespace Konversation
explicit TransferPanel(QWidget *parent);
~TransferPanel() override;
TransferView *getTransferView();
TransferView *getTransferView() const;
void openLocation(Transfer *transfer);
void openFileInfoDialog(Transfer *transfer);
......
......@@ -608,7 +608,7 @@ namespace Konversation
failed(i18n("Timed out"));
}
// protected, static
QString TransferSend::getQFileErrorString(int code)
QString TransferSend::getQFileErrorString(int code) const
{
QString errorString;
......
......@@ -84,7 +84,7 @@ namespace Konversation
void startConnectionTimer(int secs);
void stopConnectionTimer();
QString getQFileErrorString(int code);
QString getQFileErrorString(int code) const;
QFile m_file;
......
......@@ -584,7 +584,7 @@ namespace Konversation
m_lastPos.setY(InvalidLastPos);
}
bool WhiteBoardPaintArea::isLastPosValid()
bool WhiteBoardPaintArea::isLastPosValid() const
{
if (m_lastPos.x() > InvalidLastPos && m_lastPos.y() > InvalidLastPos)
{
......
......@@ -99,7 +99,7 @@ namespace Konversation
private:
inline void makeLastPosInvalid();
inline bool isLastPosValid();
inline bool isLastPosValid() const;
inline void checkImageSize(int x1, int y1, int x2, int y2, int penWidth = 1);
inline void resizeImage(int width, int height);
......
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