Fix build

This commit is contained in:
Julien Wadel 2024-03-14 15:07:25 +01:00
parent c824bd6c83
commit 1e34f38782
9 changed files with 17 additions and 18 deletions

View file

@ -48,9 +48,9 @@ int TimeZoneModel::getStandardTimeOffset() const {
} }
QString TimeZoneModel::getCountryName() const { QString TimeZoneModel::getCountryName() const {
return QLocale::countryToString(mTimeZone.country()); return QLocale::territoryToString(mTimeZone.territory());
} }
QString TimeZoneModel::getDisplayName() const { QString TimeZoneModel::getDisplayName() const {
return mTimeZone.displayName(QTimeZone::TimeType::GenericTime, QTimeZone::NameType::LongName); return mTimeZone.displayName(QTimeZone::TimeType::GenericTime, QTimeZone::NameType::LongName);
} }

View file

@ -97,7 +97,7 @@ int TimeZoneList::get(const QTimeZone &timeZone) const {
auto today = QDateTime::currentDateTime(); auto today = QDateTime::currentDateTime();
it = find_if(mList.cbegin(), mList.cend(), [&timeZone, today](QSharedPointer<QObject> item) { it = find_if(mList.cbegin(), mList.cend(), [&timeZone, today](QSharedPointer<QObject> item) {
auto tz = item.objectCast<TimeZoneModel>()->getTimeZone(); auto tz = item.objectCast<TimeZoneModel>()->getTimeZone();
return (timeZone.country() == QLocale::AnyCountry || tz.country() == timeZone.country()) && return (timeZone.territory() == QLocale::AnyCountry || tz.territory() == timeZone.territory()) &&
tz.standardTimeOffset(today) == timeZone.standardTimeOffset(today); tz.standardTimeOffset(today) == timeZone.standardTimeOffset(today);
}); });
} }

View file

@ -139,7 +139,7 @@ void ConferenceModel::onActiveSpeakerParticipantDevice(
} }
void ConferenceModel::onParticipantAdded(const std::shared_ptr<linphone::Conference> &conference, void ConferenceModel::onParticipantAdded(const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<const linphone::Participant> &participant) { const std::shared_ptr<linphone::Participant> &participant) {
qDebug() << "onParticipantAdded: " << participant->getAddress()->asString().c_str(); qDebug() << "onParticipantAdded: " << participant->getAddress()->asString().c_str();
emit participantAdded(participant); emit participantAdded(participant);
} }
@ -148,9 +148,8 @@ void ConferenceModel::onParticipantRemoved(const std::shared_ptr<linphone::Confe
qDebug() << "onParticipantRemoved"; qDebug() << "onParticipantRemoved";
emit participantRemoved(participant); emit participantRemoved(participant);
} }
void ConferenceModel::onParticipantDeviceAdded( void ConferenceModel::onParticipantDeviceAdded(const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<linphone::Conference> &conference, const std::shared_ptr<linphone::ParticipantDevice> &participantDevice) {
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) {
qDebug() << "onParticipantDeviceAdded"; qDebug() << "onParticipantDeviceAdded";
qDebug() << "Me devices : " << conference->getMe()->getDevices().size(); qDebug() << "Me devices : " << conference->getMe()->getDevices().size();
if (conference->getMe()->getDevices().size() > 1) if (conference->getMe()->getDevices().size() > 1)
@ -215,4 +214,4 @@ void ConferenceModel::onSubjectChanged(const std::shared_ptr<linphone::Conferenc
void ConferenceModel::onAudioDeviceChanged(const std::shared_ptr<linphone::Conference> &conference, void ConferenceModel::onAudioDeviceChanged(const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<const linphone::AudioDevice> &audioDevice) { const std::shared_ptr<const linphone::AudioDevice> &audioDevice) {
qDebug() << "onAudioDeviceChanged is not yet implemented."; qDebug() << "onAudioDeviceChanged is not yet implemented.";
} }

View file

@ -72,7 +72,7 @@ private:
const std::shared_ptr<linphone::Conference> &conference, const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) override; const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) override;
virtual void onParticipantAdded(const std::shared_ptr<linphone::Conference> &conference, virtual void onParticipantAdded(const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<const linphone::Participant> &participant) override; const std::shared_ptr<linphone::Participant> &participant) override;
virtual void onParticipantRemoved(const std::shared_ptr<linphone::Conference> &conference, virtual void onParticipantRemoved(const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<const linphone::Participant> &participant) override; const std::shared_ptr<const linphone::Participant> &participant) override;
virtual void virtual void
@ -80,7 +80,7 @@ private:
const std::shared_ptr<const linphone::Participant> &participant) override; const std::shared_ptr<const linphone::Participant> &participant) override;
virtual void virtual void
onParticipantDeviceAdded(const std::shared_ptr<linphone::Conference> &conference, onParticipantDeviceAdded(const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) override; const std::shared_ptr<linphone::ParticipantDevice> &participantDevice) override;
virtual void virtual void
onParticipantDeviceRemoved(const std::shared_ptr<linphone::Conference> &conference, onParticipantDeviceRemoved(const std::shared_ptr<linphone::Conference> &conference,
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) override; const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) override;

View file

@ -226,7 +226,7 @@ void CoreModel::onConferenceStateChanged(const std::shared_ptr<linphone::Core> &
emit conferenceStateChanged(core, conference, state); emit conferenceStateChanged(core, conference, state);
} }
void CoreModel::onConfiguringStatus(const std::shared_ptr<linphone::Core> &core, void CoreModel::onConfiguringStatus(const std::shared_ptr<linphone::Core> &core,
linphone::Config::ConfiguringState status, linphone::ConfiguringState status,
const std::string &message) { const std::string &message) {
emit configuringStatus(core, status, message); emit configuringStatus(core, status, message);
} }

View file

@ -113,7 +113,7 @@ private:
linphone::Conference::State state) override; linphone::Conference::State state) override;
virtual void onConfiguringStatus(const std::shared_ptr<linphone::Core> &core, virtual void onConfiguringStatus(const std::shared_ptr<linphone::Core> &core,
linphone::Config::ConfiguringState status, linphone::ConfiguringState status,
const std::string &message) override; const std::string &message) override;
virtual void onDefaultAccountChanged(const std::shared_ptr<linphone::Core> &core, virtual void onDefaultAccountChanged(const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::Account> &account) override; const std::shared_ptr<linphone::Account> &account) override;
@ -200,7 +200,7 @@ signals:
const std::shared_ptr<linphone::Conference> &conference, const std::shared_ptr<linphone::Conference> &conference,
linphone::Conference::State state); linphone::Conference::State state);
void configuringStatus(const std::shared_ptr<linphone::Core> &core, void configuringStatus(const std::shared_ptr<linphone::Core> &core,
linphone::Config::ConfiguringState status, linphone::ConfiguringState status,
const std::string &message); const std::string &message);
void defaultAccountChanged(const std::shared_ptr<linphone::Core> &core, void defaultAccountChanged(const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::Account> &account); const std::shared_ptr<linphone::Account> &account);

View file

@ -355,7 +355,7 @@ QString Utils::computeUserAgent() {
.arg(qVersion()); .arg(qVersion());
*/ */
} }
QString Utils::getCountryName(const QLocale::Country &p_country) { QString Utils::getCountryName(const QLocale::Territory &p_country) {
QString countryName; QString countryName;
switch (p_country) { switch (p_country) {
case QLocale::Afghanistan: case QLocale::Afghanistan:
@ -1087,10 +1087,10 @@ QString Utils::getCountryName(const QLocale::Country &p_country) {
if ((countryName = QCoreApplication::translate("country", "Zimbabwe")) == "Zimbabwe") countryName = ""; if ((countryName = QCoreApplication::translate("country", "Zimbabwe")) == "Zimbabwe") countryName = "";
break; break;
default: { default: {
countryName = QLocale::countryToString(p_country); countryName = QLocale::territoryToString(p_country);
} }
} }
if (countryName == "") countryName = QLocale::countryToString(p_country); if (countryName == "") countryName = QLocale::territoryToString(p_country);
return countryName; return countryName;
} }
QString Utils::toDateString(QDateTime date, const QString &format) { QString Utils::toDateString(QDateTime date, const QString &format) {

View file

@ -95,7 +95,7 @@ public:
Q_INVOKABLE static QString findAvatarByAddress(const QString &address); Q_INVOKABLE static QString findAvatarByAddress(const QString &address);
static QString generateSavedFilename(const QString &from, const QString &to); static QString generateSavedFilename(const QString &from, const QString &to);
Q_INVOKABLE static bool isMe(const QString &address); Q_INVOKABLE static bool isMe(const QString &address);
static QString getCountryName(const QLocale::Country &p_country); static QString getCountryName(const QLocale::Territory &p_country);
static QString getApplicationProduct(); static QString getApplicationProduct();
static QString getOsProduct(); static QString getOsProduct();

@ -1 +1 @@
Subproject commit f771d655e30169e59d8b3736d4e2a30e52e29f18 Subproject commit 98c2b724e1a045eb46ccba23a912ba6e1ac0647d