diff options
author | Hartmnt <hartmunt@protonmail.com> | 2022-09-05 19:47:15 +0300 |
---|---|---|
committer | Hartmnt <hartmunt@protonmail.com> | 2022-09-08 11:47:39 +0300 |
commit | bacb371f833bb6863b6bbdb43c2894b89750feb1 (patch) | |
tree | 5676079417ab2bf57d5b5a78cd8f5ab813dd6f53 /src/mumble | |
parent | 6dd2b31974a48dfb3839bc1ef1bc29674ec7ed9d (diff) |
REFAC(client, server): Rename uiVersion to m_version
Renames the internal version member variables from "uiVersion"
to "m_version"
Diffstat (limited to 'src/mumble')
-rw-r--r-- | src/mumble/ACLEditor.cpp | 6 | ||||
-rw-r--r-- | src/mumble/API_v_1_x_x.cpp | 2 | ||||
-rw-r--r-- | src/mumble/AudioInput.cpp | 2 | ||||
-rw-r--r-- | src/mumble/ConnectDialog.cpp | 10 | ||||
-rw-r--r-- | src/mumble/ConnectDialog.h | 2 | ||||
-rw-r--r-- | src/mumble/MainWindow.cpp | 10 | ||||
-rw-r--r-- | src/mumble/Messages.cpp | 2 | ||||
-rw-r--r-- | src/mumble/ServerHandler.cpp | 10 | ||||
-rw-r--r-- | src/mumble/ServerHandler.h | 2 | ||||
-rw-r--r-- | src/mumble/ServerInformation.cpp | 2 | ||||
-rw-r--r-- | src/mumble/VoiceRecorder.cpp | 4 | ||||
-rw-r--r-- | src/mumble/VoiceRecorderDialog.cpp | 2 |
12 files changed, 27 insertions, 27 deletions
diff --git a/src/mumble/ACLEditor.cpp b/src/mumble/ACLEditor.cpp index b948929cf..4dcae1237 100644 --- a/src/mumble/ACLEditor.cpp +++ b/src/mumble/ACLEditor.cpp @@ -59,7 +59,7 @@ ACLEditor::ACLEditor(int channelparentid, QWidget *p) : QDialog(p) { qleChannelPassword->hide(); qlChannelPassword->hide(); - if (Global::get().sh->uiVersion >= Version::fromComponents(1, 3, 0)) { + if (Global::get().sh->m_version >= Version::fromComponents(1, 3, 0)) { qsbChannelMaxUsers->setRange(0, INT_MAX); qsbChannelMaxUsers->setValue(0); qsbChannelMaxUsers->setSpecialValueText(tr("Default server value")); @@ -125,7 +125,7 @@ ACLEditor::ACLEditor(int channelid, const MumbleProto::ACL &mea, QWidget *p) : Q qsbChannelPosition->setRange(INT_MIN, INT_MAX); qsbChannelPosition->setValue(pChannel->iPosition); - if (Global::get().sh->uiVersion >= Version::fromComponents(1, 3, 0)) { + if (Global::get().sh->m_version >= Version::fromComponents(1, 3, 0)) { qsbChannelMaxUsers->setRange(0, INT_MAX); qsbChannelMaxUsers->setValue(pChannel->uiMaxUsers); qsbChannelMaxUsers->setSpecialValueText(tr("Default server value")); @@ -149,7 +149,7 @@ ACLEditor::ACLEditor(int channelid, const MumbleProto::ACL &mea, QWidget *p) : Q if (!name.isEmpty()) { // If the server's version is less than 1.4.0 then it won't support the new permissions. // Skipping this iteration of the loop prevents checkboxes for it being added to the UI. - if (Global::get().sh->uiVersion < Version::fromComponents(1, 4, 0) + if (Global::get().sh->m_version < Version::fromComponents(1, 4, 0) && (perm == ChanACL::ResetUserContent || perm == ChanACL::Listen)) { continue; } diff --git a/src/mumble/API_v_1_x_x.cpp b/src/mumble/API_v_1_x_x.cpp index 3bc6b287f..fa8e6242f 100644 --- a/src/mumble/API_v_1_x_x.cpp +++ b/src/mumble/API_v_1_x_x.cpp @@ -1561,7 +1561,7 @@ void MumbleAPI::sendData_v_1_0_x(mumble_plugin_id_t callerID, mumble_connection_ mpdt.set_dataid(dataID); if (Global::get().sh) { - if (Global::get().sh->uiVersion < Version::fromComponents(1, 4, 0)) { + if (Global::get().sh->m_version < Version::fromComponents(1, 4, 0)) { // The sendMessage call relies on the server relaying the message to the respective receiver. This // functionality was added to the server protocol in version 1.4.0, so an older server will not know what to // do with the received message. diff --git a/src/mumble/AudioInput.cpp b/src/mumble/AudioInput.cpp index 727f8584e..3b212f1c6 100644 --- a/src/mumble/AudioInput.cpp +++ b/src/mumble/AudioInput.cpp @@ -1317,7 +1317,7 @@ void AudioInput::flushCheck(const QByteArray &frame, bool terminator, int voiceT recorder->getRecordUser().addFrame(audioData); } - m_udpEncoder.setProtocolVersion(sh->uiVersion); + m_udpEncoder.setProtocolVersion(sh->m_version); } } diff --git a/src/mumble/ConnectDialog.cpp b/src/mumble/ConnectDialog.cpp index dea625e87..eb93c9ee1 100644 --- a/src/mumble/ConnectDialog.cpp +++ b/src/mumble/ConnectDialog.cpp @@ -73,7 +73,7 @@ void PingStats::init() { uiBandwidth = 0; uiSent = 0; uiRecv = 0; - uiVersion = Version::UNKNOWN; + m_version = Version::UNKNOWN; } void PingStats::reset() { @@ -322,7 +322,7 @@ ServerItem::ServerItem(const ServerItem *si) { qlAddresses = si->qlAddresses; bCA = si->bCA; - uiVersion = si->uiVersion; + m_version = si->m_version; uiPing = si->uiPing; uiPingSort = si->uiPing; uiUsers = si->uiUsers; @@ -543,7 +543,7 @@ QVariant ServerItem::data(int column, int role) const { QString::fromLatin1("%1/%2").arg(uiUsers).arg(uiMaxUsers)) + QString::fromLatin1("<tr><th align=left>%1</th><td>%2</td></tr>") .arg(ConnectDialog::tr("Version")) - .arg(Version::toString(uiVersion)); + .arg(Version::toString(m_version)); } } qs += QLatin1String("</table>"); @@ -1578,7 +1578,7 @@ void ConnectDialog::timeTick() { tHover.restart(); for (const ServerAddress &addr : si->qlAddresses) { - sendPing(addr.host.toAddress(), addr.port, si->uiVersion); + sendPing(addr.host.toAddress(), addr.port, si->m_version); } } @@ -1832,7 +1832,7 @@ void ConnectDialog::udpReply() { quint64 elapsed = tPing.elapsed() - (pingData.timestamp ^ qhPingRand.value(address)); for (ServerItem *si : qhPings.value(address)) { - si->uiVersion = pingData.serverVersion; + si->m_version = pingData.serverVersion; quint32 users = pingData.userCount; quint32 maxusers = pingData.maxUserCount; si->uiBandwidth = pingData.maxBandwidthPerUser; diff --git a/src/mumble/ConnectDialog.h b/src/mumble/ConnectDialog.h index dd4165363..b8021569e 100644 --- a/src/mumble/ConnectDialog.h +++ b/src/mumble/ConnectDialog.h @@ -54,7 +54,7 @@ protected: void init(); public: - Version::full_t uiVersion; + Version::full_t m_version; quint32 uiPing; quint32 uiPingSort; quint32 uiUsers; diff --git a/src/mumble/MainWindow.cpp b/src/mumble/MainWindow.cpp index f949104a5..1cb3618e9 100644 --- a/src/mumble/MainWindow.cpp +++ b/src/mumble/MainWindow.cpp @@ -1422,7 +1422,7 @@ void MainWindow::on_qmSelf_aboutToShow() { qaSelfRegister->setEnabled(user && (user->iId < 0) && !user->qsHash.isEmpty() && (Global::get().pPermissions & (ChanACL::SelfRegister | ChanACL::Write))); - if (Global::get().sh && Global::get().sh->uiVersion >= Version::fromComponents(1, 2, 3)) { + if (Global::get().sh && Global::get().sh->m_version >= Version::fromComponents(1, 2, 3)) { qaSelfPrioritySpeaker->setEnabled(user && Global::get().pPermissions & (ChanACL::Write | ChanACL::MuteDeafen)); qaSelfPrioritySpeaker->setChecked(user && user->bPrioritySpeaker); } else { @@ -1618,7 +1618,7 @@ void MainWindow::qmUser_aboutToShow() { qmUser->addAction(qaUserBan); qmUser->addAction(qaUserMute); qmUser->addAction(qaUserDeaf); - if (Global::get().sh && Global::get().sh->uiVersion >= Version::fromComponents(1, 2, 3)) + if (Global::get().sh && Global::get().sh->m_version >= Version::fromComponents(1, 2, 3)) qmUser->addAction(qaUserPrioritySpeaker); qmUser->addAction(qaUserLocalMute); qmUser->addAction(qaUserLocalIgnore); @@ -1644,7 +1644,7 @@ void MainWindow::qmUser_aboutToShow() { } qmUser->addAction(qaUserTextMessage); - if (Global::get().sh && Global::get().sh->uiVersion >= Version::fromComponents(1, 2, 2)) + if (Global::get().sh && Global::get().sh->m_version >= Version::fromComponents(1, 2, 2)) qmUser->addAction(qaUserInformation); if (p && (p->iId < 0) && !p->qsHash.isEmpty() @@ -1707,7 +1707,7 @@ void MainWindow::qmUser_aboutToShow() { qaUserLocalIgnoreTTS->setEnabled(!isSelf); // If the server's version is less than 1.4.0 it won't support the new permission to reset a comment/avatar, so // fall back to the old method - if (Global::get().sh->uiVersion < Version::fromComponents(1, 4, 0)) { + if (Global::get().sh->m_version < Version::fromComponents(1, 4, 0)) { qaUserCommentReset->setEnabled(!p->qbaCommentHash.isEmpty() && (Global::get().pPermissions & (ChanACL::Move | ChanACL::Write))); qaUserTextureReset->setEnabled(!p->qbaTextureHash.isEmpty() @@ -2181,7 +2181,7 @@ void MainWindow::qmChannel_aboutToShow() { qmChannel->addSeparator(); } - if (c && Global::get().sh && Global::get().sh->uiVersion >= Version::fromComponents(1, 4, 0)) { + if (c && Global::get().sh && Global::get().sh->m_version >= Version::fromComponents(1, 4, 0)) { // If the server's version is less than 1.4, the listening feature is not supported yet // and thus it doesn't make sense to show the action for it qmChannel->addAction(qaChannelListen); diff --git a/src/mumble/Messages.cpp b/src/mumble/Messages.cpp index 2d5e4d4b8..631c11896 100644 --- a/src/mumble/Messages.cpp +++ b/src/mumble/Messages.cpp @@ -1234,7 +1234,7 @@ void MainWindow::msgCodecVersion(const MumbleProto::CodecVersion &msg) { } // Workaround for broken 1.2.2 servers - if (Global::get().sh && Global::get().sh->uiVersion == Version::fromComponents(1, 2, 2) && alpha != -1 + if (Global::get().sh && Global::get().sh->m_version == Version::fromComponents(1, 2, 2) && alpha != -1 && alpha == beta) { if (pref) beta = Global::get().iCodecBeta; diff --git a/src/mumble/ServerHandler.cpp b/src/mumble/ServerHandler.cpp index 8242ea017..e4048e400 100644 --- a/src/mumble/ServerHandler.cpp +++ b/src/mumble/ServerHandler.cpp @@ -115,7 +115,7 @@ ServerHandler::ServerHandler() : database(new Database(QLatin1String("ServerHand usPort = 0; bUdp = true; tConnectionTimeoutTimer = nullptr; - uiVersion = Version::UNKNOWN; + m_version = Version::UNKNOWN; iInFlightTCPPings = 0; // assign connection ID @@ -198,7 +198,7 @@ int ServerHandler::getConnectionID() const { } void ServerHandler::setProtocolVersion(Version::full_t version) { - uiVersion = version; + m_version = version; m_udpPingEncoder.setProtocolVersion(version); m_udpDecoder.setProtocolVersion(version); @@ -455,7 +455,7 @@ void ServerHandler::run() { accUDP = accTCP = accClean; - uiVersion = Version::UNKNOWN; + m_version = Version::UNKNOWN; qsRelease = QString(); qsOS = QString(); qsOSVersion = QString(); @@ -580,7 +580,7 @@ void ServerHandler::sendPingInternal() { pingData.timestamp = t; pingData.requestAdditionalInformation = false; - m_udpPingEncoder.setProtocolVersion(uiVersion); + m_udpPingEncoder.setProtocolVersion(m_version); gsl::span< const Mumble::Protocol::byte > encodedPacket = m_udpPingEncoder.encodePingPacket(pingData); sendMessage(encodedPacket.data(), encodedPacket.size(), true); @@ -1026,7 +1026,7 @@ void ServerHandler::setUserComment(unsigned int uiSession, const QString &commen void ServerHandler::setUserTexture(unsigned int uiSession, const QByteArray &qba) { QByteArray texture; - if ((uiVersion >= Version::fromComponents(1, 2, 2)) || qba.isEmpty()) { + if ((m_version >= Version::fromComponents(1, 2, 2)) || qba.isEmpty()) { texture = qba; } else { QByteArray raw = qba; diff --git a/src/mumble/ServerHandler.h b/src/mumble/ServerHandler.h index 74608be64..a66971eff 100644 --- a/src/mumble/ServerHandler.h +++ b/src/mumble/ServerHandler.h @@ -108,7 +108,7 @@ public: QHash< ServerAddress, QString > qhHostnames; ServerAddress saTargetServer; - Version::full_t uiVersion; + Version::full_t m_version; QString qsRelease; QString qsOS; QString qsOSVersion; diff --git a/src/mumble/ServerInformation.cpp b/src/mumble/ServerInformation.cpp index b47924f9c..bef224c8a 100644 --- a/src/mumble/ServerInformation.cpp +++ b/src/mumble/ServerInformation.cpp @@ -71,7 +71,7 @@ void ServerInformation::updateServerInformation() { serverInfo_host->setText(host); serverInfo_port->setText(QString::number(port)); serverInfo_users->setText(QString::fromLatin1("%1 / %2").arg(userCount).arg(maxUserCount)); - serverInfo_protocol->setText(Version::toString(Global::get().sh->uiVersion)); + serverInfo_protocol->setText(Version::toString(Global::get().sh->m_version)); serverInfo_release->setText(release); serverInfo_os->setText(os); } diff --git a/src/mumble/VoiceRecorder.cpp b/src/mumble/VoiceRecorder.cpp index e2d25e7f0..02349e6d9 100644 --- a/src/mumble/VoiceRecorder.cpp +++ b/src/mumble/VoiceRecorder.cpp @@ -292,7 +292,7 @@ bool VoiceRecorder::ensureFileIsOpenedFor(SF_INFO &soundFileInfo, boost::shared_ void VoiceRecorder::run() { Q_ASSERT(!m_recording); - if (Global::get().sh && Global::get().sh->uiVersion < Version::fromComponents(1, 2, 3)) + if (Global::get().sh && Global::get().sh->m_version < Version::fromComponents(1, 2, 3)) return; SF_INFO soundFileInfo = createSoundFileInfo(); @@ -306,7 +306,7 @@ void VoiceRecorder::run() { m_sleepCondition.wait(&m_sleepLock); if (!m_recording || m_abort - || (Global::get().sh && Global::get().sh->uiVersion < Version::fromComponents(1, 2, 3))) { + || (Global::get().sh && Global::get().sh->m_version < Version::fromComponents(1, 2, 3))) { m_sleepLock.unlock(); break; } diff --git a/src/mumble/VoiceRecorderDialog.cpp b/src/mumble/VoiceRecorderDialog.cpp index 856318aad..222db2747 100644 --- a/src/mumble/VoiceRecorderDialog.cpp +++ b/src/mumble/VoiceRecorderDialog.cpp @@ -113,7 +113,7 @@ void VoiceRecorderDialog::on_qpbStart_clicked() { return; } - if (Global::get().sh->uiVersion < Version::fromComponents(1, 2, 3)) { + if (Global::get().sh->m_version < Version::fromComponents(1, 2, 3)) { QMessageBox::critical(this, tr("Recorder"), tr("The server you are currently connected to is version 1.2.2 or older. " "For privacy reasons, recording on servers of versions older than 1.2.3 " |