chore: declare const methods recommened by sonar
This commit is contained in:
parent
635962618f
commit
c224cd4661
48 changed files with 91 additions and 87 deletions
|
|
@ -751,7 +751,7 @@ const int *ArchNetworkBSD::getUnblockPipeForThread(ArchThread thread)
|
|||
return unblockPipe;
|
||||
}
|
||||
|
||||
void ArchNetworkBSD::throwError(int err)
|
||||
void ArchNetworkBSD::throwError(int err) const
|
||||
{
|
||||
switch (err) {
|
||||
case EINTR:
|
||||
|
|
@ -822,7 +822,7 @@ void ArchNetworkBSD::throwError(int err)
|
|||
}
|
||||
}
|
||||
|
||||
void ArchNetworkBSD::throwNameError(int err)
|
||||
void ArchNetworkBSD::throwNameError(int err) const
|
||||
{
|
||||
static const char *s_msg[] = {
|
||||
"The specified host is unknown", "The requested name is valid but does not have an IP address",
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ private:
|
|||
const int *getUnblockPipe();
|
||||
const int *getUnblockPipeForThread(ArchThread);
|
||||
void setBlockingOnSocket(int fd, bool blocking);
|
||||
void throwError(int);
|
||||
void throwNameError(int);
|
||||
void throwError(int) const;
|
||||
void throwNameError(int) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<Deps> m_pDeps;
|
||||
|
|
|
|||
|
|
@ -72,8 +72,9 @@ bool ConsoleLogOutputter::write(ELevel level, const char *msg)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ConsoleLogOutputter::flush()
|
||||
void ConsoleLogOutputter::flush() const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
void close() override;
|
||||
void show(bool showIfEmpty) override;
|
||||
bool write(ELevel level, const char *message) override;
|
||||
void flush();
|
||||
void flush() const;
|
||||
};
|
||||
|
||||
//! Write log to file
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ void App::setupFileLogging()
|
|||
}
|
||||
}
|
||||
|
||||
void App::loggingFilterWarning()
|
||||
void App::loggingFilterWarning() const
|
||||
{
|
||||
if (CLOG->getFilter() > CLOG->getConsoleMaxLevel()) {
|
||||
if (argsBase().m_logFile == nullptr) {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public:
|
|||
int run(int argc, char **argv);
|
||||
int daemonMainLoop(int, const char **);
|
||||
void setupFileLogging();
|
||||
void loggingFilterWarning();
|
||||
void loggingFilterWarning() const;
|
||||
void initApp(int argc, const char **argv) override;
|
||||
void initApp(int argc, char **argv)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ bool ArgParser::parsePlatformArgs(
|
|||
#endif
|
||||
}
|
||||
|
||||
bool ArgParser::parseGenericArgs(int argc, const char *const *argv, int &i)
|
||||
bool ArgParser::parseGenericArgs(int argc, const char *const *argv, int &i) const
|
||||
{
|
||||
if (isArg(i, argc, argv, "-a", "--address", 1)) {
|
||||
argsBase().m_deskflowAddress = argv[++i];
|
||||
|
|
@ -197,7 +197,7 @@ bool ArgParser::parseGenericArgs(int argc, const char *const *argv, int &i)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ArgParser::parseDeprecatedArgs(int argc, const char *const *argv, int &i)
|
||||
bool ArgParser::parseDeprecatedArgs(int argc, const char *const *argv, int &i) const
|
||||
{
|
||||
static const std::vector<const char *> deprecatedArgs = {
|
||||
"--crypto-pass", "--res-w", "--res-h", "--prm-wc", "--prm-hc"
|
||||
|
|
@ -353,13 +353,13 @@ ArgParser::assembleCommand(std::vector<std::string> &argsArray, std::string igno
|
|||
return result;
|
||||
}
|
||||
|
||||
void ArgParser::updateCommonArgs(const char *const *argv)
|
||||
void ArgParser::updateCommonArgs(const char *const *argv) const
|
||||
{
|
||||
argsBase().m_name = ARCH->getHostName();
|
||||
argsBase().m_pname = QFileInfo(argv[0]).fileName().toLocal8Bit().constData();
|
||||
}
|
||||
|
||||
bool ArgParser::checkUnexpectedArgs()
|
||||
bool ArgParser::checkUnexpectedArgs() const
|
||||
{
|
||||
#if SYSAPI_WIN32
|
||||
// suggest that user installs as a windows service. when launched as
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ public:
|
|||
bool parseServerArgs(deskflow::ServerArgs &args, int argc, const char *const *argv);
|
||||
bool parseClientArgs(deskflow::ClientArgs &args, int argc, const char *const *argv);
|
||||
bool parsePlatformArgs(deskflow::ArgsBase &argsBase, const int &argc, const char *const *argv, int &i, bool isServer);
|
||||
bool parseGenericArgs(int argc, const char *const *argv, int &i);
|
||||
bool parseDeprecatedArgs(int argc, const char *const *argv, int &i);
|
||||
void setArgsBase(deskflow::ArgsBase &argsBase)
|
||||
bool parseGenericArgs(int argc, const char *const *argv, int &i) const;
|
||||
bool parseDeprecatedArgs(int argc, const char *const *argv, int &i) const;
|
||||
void setArgsBase(deskflow::ArgsBase &argsBase) const
|
||||
{
|
||||
m_argsBase = &argsBase;
|
||||
}
|
||||
|
|
@ -49,8 +49,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
void updateCommonArgs(const char *const *argv);
|
||||
bool checkUnexpectedArgs();
|
||||
void updateCommonArgs(const char *const *argv) const;
|
||||
bool checkUnexpectedArgs() const;
|
||||
|
||||
private:
|
||||
App *m_app;
|
||||
|
|
|
|||
|
|
@ -204,17 +204,18 @@ void ClientApp::updateStatus()
|
|||
updateStatus("");
|
||||
}
|
||||
|
||||
void ClientApp::updateStatus(const std::string &msg)
|
||||
void ClientApp::updateStatus(const std::string &msg) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void ClientApp::resetRestartTimeout()
|
||||
void ClientApp::resetRestartTimeout() const
|
||||
{
|
||||
// retry time can nolonger be changed
|
||||
// s_retryTime = 0.0;
|
||||
}
|
||||
|
||||
double ClientApp::nextRestartTimeout()
|
||||
double ClientApp::nextRestartTimeout() const
|
||||
{
|
||||
// retry at a constant rate (Issue 52)
|
||||
return RETRY_TIME;
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ public:
|
|||
//
|
||||
|
||||
void updateStatus();
|
||||
void updateStatus(const std::string &msg);
|
||||
void resetRestartTimeout();
|
||||
double nextRestartTimeout();
|
||||
void updateStatus(const std::string &msg) const;
|
||||
void resetRestartTimeout() const;
|
||||
double nextRestartTimeout() const;
|
||||
void handleScreenError(const Event &, void *);
|
||||
deskflow::Screen *openClientScreen();
|
||||
void closeClientScreen(deskflow::Screen *screen);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
int32_t pollActiveGroup() const override = 0;
|
||||
void pollPressedKeys(KeyButtonSet &pressedKeys) const override = 0;
|
||||
|
||||
int32_t getKeyState(KeyButton keyButton)
|
||||
int32_t getKeyState(KeyButton keyButton) const
|
||||
{
|
||||
return m_keys[keyButton];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ void Screen::mouseMove(int32_t x, int32_t y)
|
|||
m_screen->fakeMouseMove(x, y);
|
||||
}
|
||||
|
||||
void Screen::mouseRelativeMove(int32_t dx, int32_t dy)
|
||||
void Screen::mouseRelativeMove(int32_t dx, int32_t dy) const
|
||||
{
|
||||
assert(!m_isPrimary);
|
||||
m_screen->fakeMouseRelativeMove(dx, dy);
|
||||
|
|
@ -400,12 +400,12 @@ void Screen::disableSecondary()
|
|||
m_screen->closeScreensaver();
|
||||
}
|
||||
|
||||
void Screen::enterPrimary()
|
||||
void Screen::enterPrimary() const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void Screen::enterSecondary(KeyModifierMask)
|
||||
void Screen::enterSecondary(KeyModifierMask) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ public:
|
|||
Synthesize mouse events to generate mouse motion by the relative
|
||||
amount \c xRel,yRel.
|
||||
*/
|
||||
void mouseRelativeMove(int32_t xRel, int32_t yRel);
|
||||
void mouseRelativeMove(int32_t xRel, int32_t yRel) const;
|
||||
|
||||
//! Notify of mouse wheel motion
|
||||
/*!
|
||||
|
|
@ -285,8 +285,8 @@ protected:
|
|||
void disablePrimary();
|
||||
void disableSecondary();
|
||||
|
||||
void enterPrimary();
|
||||
void enterSecondary(KeyModifierMask toggleMask);
|
||||
void enterPrimary() const;
|
||||
void enterSecondary(KeyModifierMask toggleMask) const;
|
||||
void leavePrimary();
|
||||
void leaveSecondary();
|
||||
|
||||
|
|
|
|||
|
|
@ -269,8 +269,9 @@ void ServerApp::updateStatus()
|
|||
updateStatus("");
|
||||
}
|
||||
|
||||
void ServerApp::updateStatus(const std::string &msg)
|
||||
void ServerApp::updateStatus(const std::string &msg) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void ServerApp::closeClientListener(ClientListener *listen)
|
||||
|
|
@ -603,6 +604,7 @@ void ServerApp::handleNoClients(const Event &, void *)
|
|||
|
||||
void ServerApp::handleScreenSwitched(const Event &e, void *)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
ISocketFactory *ServerApp::getSocketFactory() const
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
void closeServer(Server *server);
|
||||
void stopRetryTimer();
|
||||
void updateStatus();
|
||||
void updateStatus(const std::string &msg);
|
||||
void updateStatus(const std::string &msg) const;
|
||||
void closeClientListener(ClientListener *listen);
|
||||
void stopServer();
|
||||
void closePrimaryClient(PrimaryClient *primaryClient);
|
||||
|
|
|
|||
|
|
@ -701,7 +701,7 @@ void MainWindow::applyConfig()
|
|||
updateModeControls(coreMode == Settings::CoreMode::Server);
|
||||
}
|
||||
|
||||
void MainWindow::saveSettings()
|
||||
void MainWindow::saveSettings() const
|
||||
{
|
||||
if (ui->rbModeClient->isChecked()) {
|
||||
Settings::setValue(Settings::Core::CoreMode, Settings::CoreMode::Client);
|
||||
|
|
@ -1116,7 +1116,7 @@ void MainWindow::setHostName()
|
|||
applyConfig();
|
||||
}
|
||||
|
||||
QString MainWindow::trustedFingerprintDatabase()
|
||||
QString MainWindow::trustedFingerprintDatabase() const
|
||||
{
|
||||
const bool isClient = m_coreProcess.mode() == CoreMode::Client;
|
||||
return isClient ? Settings::tlsTrustedServersDb() : Settings::tlsTrustedClientsDb();
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ private:
|
|||
void handleLogLine(const QString &line);
|
||||
void updateLocalFingerprint();
|
||||
void updateScreenName();
|
||||
void saveSettings();
|
||||
void saveSettings() const;
|
||||
void showConfigureServer(const QString &message);
|
||||
void restoreWindow();
|
||||
void setupControls();
|
||||
|
|
@ -159,7 +159,7 @@ private:
|
|||
* @brief trustedFingerprintDatabase get the FingerprintDatabase for the trusted clients or trusted servers.
|
||||
* @return The path to the trusted fingerprint file
|
||||
*/
|
||||
QString trustedFingerprintDatabase();
|
||||
QString trustedFingerprintDatabase() const;
|
||||
|
||||
// Generate prints if they are missing
|
||||
// Returns true if successful
|
||||
|
|
|
|||
|
|
@ -454,12 +454,12 @@ void ServerConfig::addClient(const QString &clientName)
|
|||
m_Screens.addScreenByPriority(Screen(clientName));
|
||||
}
|
||||
|
||||
void ServerConfig::setConfigFile(const QString &configFile)
|
||||
void ServerConfig::setConfigFile(const QString &configFile) const
|
||||
{
|
||||
Settings::setValue(Settings::Server::ExternalConfigFile, configFile);
|
||||
}
|
||||
|
||||
void ServerConfig::setUseExternalConfig(bool useExternalConfig)
|
||||
void ServerConfig::setUseExternalConfig(bool useExternalConfig) const
|
||||
{
|
||||
Settings::setValue(Settings::Server::ExternalConfig, useExternalConfig);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,8 +241,8 @@ private:
|
|||
{
|
||||
m_ClipboardSharing = on;
|
||||
}
|
||||
void setConfigFile(const QString &configFile);
|
||||
void setUseExternalConfig(bool useExternalConfig);
|
||||
void setConfigFile(const QString &configFile) const;
|
||||
void setUseExternalConfig(bool useExternalConfig) const;
|
||||
size_t setClipboardSharingSize(size_t size);
|
||||
QList<bool> &switchCorners()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -700,7 +700,7 @@ QString CoreProcess::requestDaemonLogPath()
|
|||
return logPath;
|
||||
}
|
||||
|
||||
void CoreProcess::persistLogDir()
|
||||
void CoreProcess::persistLogDir() const
|
||||
{
|
||||
QDir(QFileInfo(Settings::value(Settings::Log::File).toString()).absolutePath()).mkpath(".");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ private:
|
|||
QString correctedInterface() const;
|
||||
QString correctedAddress() const;
|
||||
QString requestDaemonLogPath();
|
||||
void persistLogDir();
|
||||
void persistLogDir() const;
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
void checkOSXNotification(const QString &line);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui{std::make_unique
|
|||
setMinimumSize(size());
|
||||
}
|
||||
|
||||
void AboutDialog::copyVersionText()
|
||||
void AboutDialog::copyVersionText() const
|
||||
{
|
||||
QString infoString = QStringLiteral("Deskflow: %1 (%2)\nQt: %3\nSystem: %4")
|
||||
.arg(kVersion, kVersionGitSha, qVersion(), QSysInfo::prettyProductName());
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
private:
|
||||
std::unique_ptr<Ui::AboutDialog> ui;
|
||||
void copyVersionText();
|
||||
void copyVersionText() const;
|
||||
|
||||
inline static const auto s_awesomeDevs = QStringList{
|
||||
// Chris is the ultimate creator, and the one who started it all in 2001.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public:
|
|||
AddClientDialog(const QString &clientName, QWidget *parent = nullptr);
|
||||
~AddClientDialog() override;
|
||||
|
||||
int addResult()
|
||||
int addResult() const
|
||||
{
|
||||
return m_AddResult;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, const IServerConfig &serverConfi
|
|||
initConnections();
|
||||
}
|
||||
|
||||
void SettingsDialog::initConnections()
|
||||
void SettingsDialog::initConnections() const
|
||||
{
|
||||
connect(this, &SettingsDialog::shown, this, &SettingsDialog::showReadOnlyMessage, Qt::QueuedConnection);
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ void SettingsDialog::updateControls()
|
|||
updateTlsControls();
|
||||
}
|
||||
|
||||
void SettingsDialog::updateRequestedKeySize()
|
||||
void SettingsDialog::updateRequestedKeySize() const
|
||||
{
|
||||
if (ui->comboTlsKeyLength->currentText() == Settings::value(Settings::Security::KeySize).toString())
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ signals:
|
|||
void shown();
|
||||
|
||||
private:
|
||||
void initConnections();
|
||||
void initConnections() const;
|
||||
void regenCertificates();
|
||||
void browseCertificatePath();
|
||||
void browseLogPath();
|
||||
|
|
@ -56,7 +56,7 @@ private:
|
|||
void updateControls();
|
||||
|
||||
/// @brief updates the setting vaule for key size.
|
||||
void updateRequestedKeySize();
|
||||
void updateRequestedKeySize() const;
|
||||
|
||||
std::unique_ptr<Ui::SettingsDialog> ui;
|
||||
const IServerConfig &m_serverConfig;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ bool TlsCertificate::generateCertificate(const QString &path, int keyLength)
|
|||
return generateFingerprint(path);
|
||||
}
|
||||
|
||||
bool TlsCertificate::generateFingerprint(const QString &certificateFilename)
|
||||
bool TlsCertificate::generateFingerprint(const QString &certificateFilename) const
|
||||
{
|
||||
qDebug("generating tls fingerprint");
|
||||
const std::string certPath = certificateFilename.toStdString();
|
||||
|
|
@ -57,12 +57,12 @@ bool TlsCertificate::generateFingerprint(const QString &certificateFilename)
|
|||
return db.write(Settings::tlsLocalDb());
|
||||
}
|
||||
|
||||
int TlsCertificate::getCertKeyLength(const QString &path)
|
||||
int TlsCertificate::getCertKeyLength(const QString &path) const
|
||||
{
|
||||
return deskflow::getCertLength(path.toStdString());
|
||||
}
|
||||
|
||||
bool TlsCertificate::isCertificateValid(const QString &path)
|
||||
bool TlsCertificate::isCertificateValid(const QString &path) const
|
||||
{
|
||||
OpenSSL_add_all_algorithms();
|
||||
ERR_load_crypto_strings();
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ class TlsCertificate : public QObject
|
|||
public:
|
||||
explicit TlsCertificate(QObject *parent = nullptr);
|
||||
|
||||
bool isCertificateValid(const QString &path);
|
||||
bool isCertificateValid(const QString &path) const;
|
||||
bool generateCertificate(const QString &path, int keyLength);
|
||||
bool generateFingerprint(const QString &certificateFilename);
|
||||
int getCertKeyLength(const QString &path);
|
||||
bool generateFingerprint(const QString &certificateFilename) const;
|
||||
int getCertKeyLength(const QString &path) const;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ void FingerprintDatabase::addTrusted(const Fingerprint &fingerprint)
|
|||
m_fingerprints.append(fingerprint);
|
||||
}
|
||||
|
||||
bool FingerprintDatabase::isTrusted(const Fingerprint &fingerprint)
|
||||
bool FingerprintDatabase::isTrusted(const Fingerprint &fingerprint) const
|
||||
{
|
||||
return m_fingerprints.contains(fingerprint);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
void clear();
|
||||
void addTrusted(const Fingerprint &fingerprint);
|
||||
bool isTrusted(const Fingerprint &fingerprint);
|
||||
bool isTrusted(const Fingerprint &fingerprint) const;
|
||||
|
||||
const QList<Fingerprint> &fingerprints() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ std::string NetworkAddress::getHostname() const
|
|||
return m_hostname;
|
||||
}
|
||||
|
||||
void NetworkAddress::checkPort()
|
||||
void NetworkAddress::checkPort() const
|
||||
{
|
||||
// check port number
|
||||
if (m_port < 0 || m_port > 65535) {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
//@}
|
||||
|
||||
private:
|
||||
void checkPort();
|
||||
void checkPort() const;
|
||||
|
||||
private:
|
||||
ArchNetAddress m_address = nullptr;
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ int SecureSocket::secureWrite(const void *buffer, int size, int &wrote)
|
|||
return wrote;
|
||||
}
|
||||
|
||||
bool SecureSocket::isSecureReady()
|
||||
bool SecureSocket::isSecureReady() const
|
||||
{
|
||||
return m_secureReady;
|
||||
}
|
||||
|
|
@ -643,7 +643,7 @@ void SecureSocket::disconnect()
|
|||
sendEvent(EventTypes::StreamInputShutdown);
|
||||
}
|
||||
|
||||
bool SecureSocket::verifyCertFingerprint(const QString &FingerprintDatabasePath)
|
||||
bool SecureSocket::verifyCertFingerprint(const QString &FingerprintDatabasePath) const
|
||||
{
|
||||
const auto cert = SSL_get_peer_certificate(m_ssl->m_ssl);
|
||||
const auto sha256 = deskflow::sslCertFingerprint(cert, Fingerprint::Type::SHA256);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
{
|
||||
m_fatal = b;
|
||||
}
|
||||
bool isSecureReady();
|
||||
bool isSecureReady() const;
|
||||
void secureConnect();
|
||||
void secureAccept();
|
||||
int secureRead(void *buffer, int size, int &read);
|
||||
|
|
@ -77,7 +77,7 @@ private:
|
|||
bool showCertificate() const;
|
||||
void checkResult(int n, int &retry);
|
||||
void disconnect();
|
||||
bool verifyCertFingerprint(const QString &FingerprintDatabasePath);
|
||||
bool verifyCertFingerprint(const QString &FingerprintDatabasePath) const;
|
||||
|
||||
ISocketMultiplexerJob *serviceConnect(ISocketMultiplexerJob *, bool, bool, bool);
|
||||
|
||||
|
|
|
|||
|
|
@ -79,11 +79,11 @@ protected:
|
|||
|
||||
void setJob(ISocketMultiplexerJob *);
|
||||
|
||||
bool isReadable()
|
||||
bool isReadable() const
|
||||
{
|
||||
return m_readable;
|
||||
}
|
||||
bool isWritable()
|
||||
bool isWritable() const
|
||||
{
|
||||
return m_writable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ EiScreen::~EiScreen()
|
|||
delete portal_input_capture_;
|
||||
}
|
||||
|
||||
void EiScreen::handle_ei_log_event(ei *ei, ei_log_priority priority, const char *message, ei_log_context *context)
|
||||
void EiScreen::handle_ei_log_event(ei *ei, ei_log_priority priority, const char *message, ei_log_context *context) const
|
||||
{
|
||||
switch (priority) {
|
||||
case EI_LOG_PRIORITY_DEBUG:
|
||||
|
|
@ -693,7 +693,7 @@ void EiScreen::on_motion_event(ei_event *event)
|
|||
}
|
||||
}
|
||||
|
||||
void EiScreen::on_abs_motion_event(ei_event *event)
|
||||
void EiScreen::on_abs_motion_event(ei_event *event) const
|
||||
{
|
||||
assert(is_primary_);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ private:
|
|||
void on_pointer_scroll_event(ei_event *event);
|
||||
void on_pointer_scroll_discrete_event(ei_event *event);
|
||||
void on_motion_event(ei_event *event);
|
||||
void on_abs_motion_event(ei_event *event);
|
||||
void on_abs_motion_event(ei_event *event) const;
|
||||
bool on_hotkey(KeyID key, bool is_press, KeyModifierMask mask);
|
||||
void handle_ei_log_event(ei *ei, ei_log_priority priority, const char *message, ei_log_context *context);
|
||||
void handle_ei_log_event(ei *ei, ei_log_priority priority, const char *message, ei_log_context *context) const;
|
||||
void handle_connected_to_eis_event(const Event &event, void *);
|
||||
void handle_portal_session_closed(const Event &event, void *);
|
||||
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ PortalInputCapture::~PortalInputCapture()
|
|||
g_object_unref(portal_);
|
||||
}
|
||||
|
||||
gboolean PortalInputCapture::timeout_handler()
|
||||
gboolean PortalInputCapture::timeout_handler() const
|
||||
{
|
||||
return true; // keep re-triggering
|
||||
}
|
||||
|
||||
int PortalInputCapture::fake_eis_fd()
|
||||
int PortalInputCapture::fake_eis_fd() const
|
||||
{
|
||||
auto path = std::getenv("LIBEI_SOCKET");
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
private:
|
||||
void glib_thread(void *);
|
||||
gboolean timeout_handler();
|
||||
gboolean timeout_handler() const;
|
||||
gboolean init_input_capture_session();
|
||||
void cb_init_input_capture_session(GObject *object, GAsyncResult *res);
|
||||
void cb_set_pointer_barriers(GObject *object, GAsyncResult *res);
|
||||
|
|
@ -68,7 +68,7 @@ private:
|
|||
reinterpret_cast<PortalInputCapture *>(data)->cb_zones_changed(session, options);
|
||||
}
|
||||
|
||||
int fake_eis_fd();
|
||||
int fake_eis_fd() const;
|
||||
|
||||
private:
|
||||
EiScreen *screen_ = nullptr;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ PortalRemoteDesktop::~PortalRemoteDesktop()
|
|||
free(session_restore_token_);
|
||||
}
|
||||
|
||||
gboolean PortalRemoteDesktop::timeout_handler()
|
||||
gboolean PortalRemoteDesktop::timeout_handler() const
|
||||
{
|
||||
return true; // keep re-triggering
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
private:
|
||||
void glib_thread(void *);
|
||||
gboolean timeout_handler();
|
||||
gboolean timeout_handler() const;
|
||||
gboolean init_remote_desktop_session();
|
||||
void cb_init_remote_desktop_session(GObject *object, GAsyncResult *res);
|
||||
void cb_session_started(GObject *object, GAsyncResult *res);
|
||||
|
|
|
|||
|
|
@ -1642,7 +1642,7 @@ ClipboardID XWindowsScreen::getClipboardID(Atom selection) const
|
|||
return kClipboardEnd;
|
||||
}
|
||||
|
||||
void XWindowsScreen::processClipboardRequest(Window requestor, Time time, Atom property)
|
||||
void XWindowsScreen::processClipboardRequest(Window requestor, Time time, Atom property) const
|
||||
{
|
||||
// check every clipboard until one returns success
|
||||
for (ClipboardID id = 0; id < kClipboardEnd; ++id) {
|
||||
|
|
@ -1652,7 +1652,7 @@ void XWindowsScreen::processClipboardRequest(Window requestor, Time time, Atom p
|
|||
}
|
||||
}
|
||||
|
||||
void XWindowsScreen::destroyClipboardRequest(Window requestor)
|
||||
void XWindowsScreen::destroyClipboardRequest(Window requestor) const
|
||||
{
|
||||
// check every clipboard until one returns success
|
||||
for (ClipboardID id = 0; id < kClipboardEnd; ++id) {
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@ private:
|
|||
ClipboardID getClipboardID(Atom selection) const;
|
||||
|
||||
// continue processing a selection request
|
||||
void processClipboardRequest(Window window, Time time, Atom property);
|
||||
void processClipboardRequest(Window window, Time time, Atom property) const;
|
||||
|
||||
// terminate a selection request
|
||||
void destroyClipboardRequest(Window window);
|
||||
void destroyClipboardRequest(Window window) const;
|
||||
|
||||
// X I/O error handler
|
||||
void onError();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ ClientProxy::~ClientProxy()
|
|||
delete m_stream;
|
||||
}
|
||||
|
||||
void ClientProxy::close(const char *msg)
|
||||
void ClientProxy::close(const char *msg) const
|
||||
{
|
||||
LOG((CLOG_DEBUG1 "send close \"%s\" to \"%s\"", msg, getName().c_str()));
|
||||
ProtocolUtil::writef(getStream(), msg);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public:
|
|||
/*!
|
||||
Ask the client to disconnect, using \p msg as the reason.
|
||||
*/
|
||||
void close(const char *msg);
|
||||
void close(const char *msg) const;
|
||||
|
||||
//@}
|
||||
//! @name accessors
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ bool ClientProxy1_5::parseMessage(const uint8_t *code)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ClientProxy1_5::fileChunkReceived()
|
||||
void ClientProxy1_5::fileChunkReceived() const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void ClientProxy1_5::dragInfoReceived()
|
||||
void ClientProxy1_5::dragInfoReceived() const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ public:
|
|||
void sendDragInfo(uint32_t fileCount, const char *info, size_t size) override;
|
||||
void fileChunkSending(uint8_t mark, char *data, size_t dataSize) override;
|
||||
bool parseMessage(const uint8_t *code) override;
|
||||
void fileChunkReceived();
|
||||
void dragInfoReceived();
|
||||
void fileChunkReceived() const;
|
||||
void dragInfoReceived() const;
|
||||
|
||||
private:
|
||||
IEventQueue *m_events;
|
||||
|
|
|
|||
|
|
@ -160,11 +160,11 @@ public:
|
|||
m_i = i.m_i;
|
||||
return *this;
|
||||
}
|
||||
std::string operator*()
|
||||
std::string operator*() const
|
||||
{
|
||||
return m_i->first;
|
||||
}
|
||||
const std::string *operator->()
|
||||
const std::string *operator->() const
|
||||
{
|
||||
return &(m_i->first);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue