diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index 9b536557bf03260563ea2a16be7b2638f5e13d7f..41e42e4d5ebb038805a3638f0ec41bfd3539be54 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -229,7 +229,7 @@ bool ManagerImpl::outgoingCall(const std::string& account_id, if (hasCurrentCall()) { DEBUG("Has current call (%s) put it onhold", current_call_id.c_str()); - // if this is not a conferenceand this and is not a conference participant + // if this is not a conference and this and is not a conference participant if (not isConference(current_call_id) and not isConferenceParticipant(current_call_id)) onHoldCall(current_call_id); else if (isConference(current_call_id) and not isConferenceParticipant(call_id)) @@ -474,12 +474,12 @@ void ManagerImpl::offHoldCall(const std::string& callId) std::string currentCallId(getCurrentCallId()); //Place current call on hold if it isn't - if (hasCurrentCall()) { - - if (not isConference(currentCallId) and not isConferenceParticipant(currentCallId)) { + if (not currentCallId.empty() and not isConference(currentCallId) and not isConferenceParticipant(currentCallId)) { DEBUG("Has current call (%s), put on hold", currentCallId.c_str()); onHoldCall(currentCallId); + } else if (isConference(currentCallId) && callId != currentCallId) { + holdConference(currentCallId); } else if (isConference(currentCallId) and not isConferenceParticipant(callId)) detachParticipant(MainBuffer::DEFAULT_ID, currentCallId); } diff --git a/kde/src/AccountWizard.cpp b/kde/src/AccountWizard.cpp index 1f55ba4700c694cf7f544878f15ac8a299d9b46b..ea28aab3177d51687767440ef57db445fef5cb1c 100755 --- a/kde/src/AccountWizard.cpp +++ b/kde/src/AccountWizard.cpp @@ -18,6 +18,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * **************************************************************************/ +#include "AccountWizard.h" //Unix #include <unistd.h> @@ -36,7 +37,6 @@ #include <KDebug> //SFLphone -#include "AccountWizard.h" #include "lib/sflphone_const.h" #include "lib/configurationmanager_interface_singleton.h" @@ -153,7 +153,7 @@ rest_account get_rest_account(QString host, QString email) kDebug() << "HOST: " << host; int res = sendRequest(host, 80, req, ret); if (res != -1) { - QStringList list = ret.split("\n"); + QStringList list = ret.split('\n'); ra.user = list[0]; ra.passwd = list[1];\ ra.success = true; @@ -240,8 +240,8 @@ void AccountWizard::accept() rest_account acc = get_rest_account(SFL_ACCOUNT_HOST, charEmailAddress); if(acc.success) { - ret += i18n("This assistant is now finished.") + "\n"; - field( FIELD_SIP_ALIAS ) = QString( acc.user) + "@" + SFL_ACCOUNT_HOST; + ret += i18n("This assistant is now finished.") + '\n'; + field( FIELD_SIP_ALIAS ) = QString( acc.user) + '@' + SFL_ACCOUNT_HOST; field( FIELD_SIP_VOICEMAIL ) = QString( ); field( FIELD_SIP_SERVER ) = QString( SFL_ACCOUNT_HOST ); field( FIELD_SIP_PASSWORD ) = QString( acc.passwd ); @@ -262,7 +262,7 @@ void AccountWizard::accept() } } else if(field(FIELD_SIP_ACCOUNT).toBool()) { //sip - ret += i18n("This assistant is now finished.") + "\n"; + ret += i18n("This assistant is now finished.") + '\n'; alias = field ( FIELD_SIP_ALIAS ).toString(); enabled = QString ( REGISTRATION_ENABLED_TRUE ) ; @@ -277,7 +277,7 @@ void AccountWizard::accept() } else { // iax - ret += i18n("This assistant is now finished.") + "\n"; + ret += i18n("This assistant is now finished.") + '\n'; alias = field ( FIELD_IAX_ALIAS ).toString(); enabled = QString ( REGISTRATION_ENABLED_TRUE ) ; @@ -317,12 +317,12 @@ void AccountWizard::accept() locale_interface = ifaceList.at(0); published_address = ifaceList.at(0); - ret += i18n( "Alias" ) + " : " + alias + "\n"; - ret += i18n( "Server" ) + " : " + server + "\n"; - ret += i18n( "Username" ) + " : " + user + "\n"; - ret += i18n( "Password" ) + " : " + password + "\n"; - ret += i18n( "Protocol" ) + " : " + protocol + "\n"; - ret += i18n( "Voicemail number" ) + " : " + mailbox + "\n"; + ret += i18n( "Alias" ) + " : " + alias + '\n'; + ret += i18n( "Server" ) + " : " + server + '\n'; + ret += i18n( "Password" ) + " : " + password + '\n'; + ret += i18n( "Protocol" ) + " : " + protocol + '\n'; + ret += i18n( "Voicemail number" ) + " : " + mailbox + '\n'; + ret += i18nc( "SIP Account username","Username" ) + " : " + user + '\n'; } if(is_create_account) { @@ -507,10 +507,10 @@ WizardAccountSIPFormPage::WizardAccountSIPFormPage(QWidget *parent) label_alias = new QLabel( i18n( "Alias" ) + " *" ); label_server = new QLabel( i18n( "Server" ) + " *" ); - label_user = new QLabel( i18n( "Username" ) + " *" ); label_password = new QLabel( i18n( "Password" ) + " *" ); label_voicemail = new QLabel( i18n( "Voicemail number" ) ); label_enableZrtp = new QLabel( i18n( "Secure with ZRTP" ) ); + label_user = new QLabel( i18nc( "SIP Account Username","Username") + " *" ); lineEdit_alias = new QLineEdit; lineEdit_server = new QLineEdit; @@ -521,10 +521,10 @@ WizardAccountSIPFormPage::WizardAccountSIPFormPage(QWidget *parent) lineEdit_password->setEchoMode(QLineEdit::Password); - registerField(QString( FIELD_SIP_ALIAS) + "*" , lineEdit_alias ); - registerField(QString( FIELD_SIP_SERVER) + "*" , lineEdit_server ); - registerField(QString( FIELD_SIP_USER) + "*" , lineEdit_user ); - registerField(QString( FIELD_SIP_PASSWORD) + "*" , lineEdit_password ); + registerField(QString( FIELD_SIP_ALIAS) + '*' , lineEdit_alias ); + registerField(QString( FIELD_SIP_SERVER) + '*' , lineEdit_server ); + registerField(QString( FIELD_SIP_USER) + '*' , lineEdit_user ); + registerField(QString( FIELD_SIP_PASSWORD) + '*' , lineEdit_password ); registerField(QString( FIELD_SIP_VOICEMAIL) , lineEdit_voicemail ); registerField(QString( FIELD_ZRTP_ENABLED) , checkBox_enableZrtp ); @@ -582,9 +582,9 @@ WizardAccountIAXFormPage::WizardAccountIAXFormPage(QWidget *parent) label_alias = new QLabel(i18n("Alias") + " *" ); label_server = new QLabel(i18n("Server") + " *" ); - label_user = new QLabel(i18n("Username") + " *" ); label_password = new QLabel(i18n("Password") + " *" ); label_voicemail = new QLabel(i18n("Voicemail number" )); + label_user = new QLabel(i18nc("SIP Account Username","Username") + " *" ); lineEdit_alias = new QLineEdit; lineEdit_server = new QLineEdit; @@ -594,10 +594,10 @@ WizardAccountIAXFormPage::WizardAccountIAXFormPage(QWidget *parent) lineEdit_password->setEchoMode(QLineEdit::Password); - registerField( QString( FIELD_IAX_ALIAS ) + "*", lineEdit_alias ); - registerField( QString( FIELD_IAX_SERVER ) + "*", lineEdit_server ); - registerField( QString( FIELD_IAX_USER ) + "*", lineEdit_user ); - registerField( QString( FIELD_IAX_PASSWORD ) + "*", lineEdit_password ); + registerField( QString( FIELD_IAX_ALIAS ) + '*', lineEdit_alias ); + registerField( QString( FIELD_IAX_SERVER ) + '*', lineEdit_server ); + registerField( QString( FIELD_IAX_USER ) + '*', lineEdit_user ); + registerField( QString( FIELD_IAX_PASSWORD ) + '*', lineEdit_password ); registerField( QString( FIELD_IAX_VOICEMAIL ) , lineEdit_voicemail ); QFormLayout *layout = new QFormLayout; diff --git a/kde/src/ActionSetAccountFirst.h b/kde/src/ActionSetAccountFirst.h index a1a6409a929082fc06816203b8d5a91cb0653002..b3884d65a61065cb98468b9aa10f8f06bab44952 100755 --- a/kde/src/ActionSetAccountFirst.h +++ b/kde/src/ActionSetAccountFirst.h @@ -35,7 +35,7 @@ private: Account* account; public: - ActionSetAccountFirst(Account * account, QObject *parent = 0); + explicit ActionSetAccountFirst(Account * account, QObject *parent = 0); ~ActionSetAccountFirst(); private slots: diff --git a/kde/src/CMakeLists.txt b/kde/src/CMakeLists.txt index 07f65943d13296e52d17df2fff2b704bd003e098..ec085a64578ab563ad284c7a9e6aecca89388f8c 100755 --- a/kde/src/CMakeLists.txt +++ b/kde/src/CMakeLists.txt @@ -107,3 +107,4 @@ INSTALL( FILES icons/transfertarrow.svg DESTINATION ${DATA_INSTALL_DIR}/sflpho INSTALL( FILES icons/confBlackWhite.svg DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde ) INSTALL( FILES icons/confBlackWhite.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde ) INSTALL( FILES icons/voicemail.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde ) +INSTALL( FILES icons/conf-small.png DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde ) diff --git a/kde/src/CallView.cpp b/kde/src/CallView.cpp index 2191b3b3ee6828afa62de1576f2aa034d7891f9c..daf36ddf8869c09608f8a20c57b88fa72470a2d0 100644 --- a/kde/src/CallView.cpp +++ b/kde/src/CallView.cpp @@ -163,6 +163,7 @@ CallTreeItemDelegate(CallView* widget) if (option.state & QStyle::State_Selected) { QStyleOptionViewItem opt2(option); opt2.rect.setWidth(opt2.rect.width()-15); + //Check if it is the last item if (index.parent().isValid() && !index.parent().child(index.row()+1,0).isValid()) { opt2.rect.setHeight(opt2.rect.height()-15); QStyledItemDelegate::paint(painter,opt2,index); @@ -410,7 +411,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime if (!QString(encodedPhoneNumber).isEmpty()) { Contact* contact = AkonadiBackend::getInstance()->getContactByPhone(encodedPhoneNumber,true); QString name; - name = (contact)?contact->getFormattedName():i18n("Unknown"); + name = (contact)?contact->getFormattedName():i18nc("Unknown peer","Unknown"); Call* call2 = SFLPhone::model()->addDialingCall(name, AccountList::getCurrentAccount()); if (call2) { call2->appendText(QString(encodedPhoneNumber)); @@ -528,10 +529,10 @@ QMimeData* CallView::mimeData( const QList<QTreeWidgetItem *> items) const } //Plain text for other applications - mimeData->setData(MIME_PLAIN_TEXT, QString(SFLPhone::model()->getCall(items[0])->getPeerName()+"\n"+SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber()).toAscii()); + mimeData->setData(MIME_PLAIN_TEXT, QString(SFLPhone::model()->getCall(items[0])->getPeerName()+'\n'+SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber()).toAscii()); //TODO Comment this line if you don't want to see ugly artefact, but the caller details will not be visible while dragged - items[0]->setText(0, SFLPhone::model()->getCall(items[0])->getPeerName() + "\n" + SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber()); + items[0]->setText(0, SFLPhone::model()->getCall(items[0])->getPeerName() + '\n' + SFLPhone::model()->getCall(items[0])->getPeerPhoneNumber()); return mimeData; } //mimeData @@ -806,9 +807,9 @@ Call* CallView::addConference(Call* conf) setCurrentItem(confItem); CallManagerInterface& callManager = CallManagerInterfaceSingleton::getInstance(); - QStringList callList = callManager.getParticipantList(conf->getConfId()); + const QStringList callList = callManager.getParticipantList(conf->getConfId()); - foreach (QString callId, callList) { + foreach (const QString& callId, callList) { kDebug() << "Adding " << callId << "to the conversation"; insertItem(extractItem(SFLPhone::model()->getIndex(callId)),confItem); } @@ -823,10 +824,10 @@ bool CallView::conferenceChanged(Call* conf) kDebug() << "Conference changed"; CallManagerInterface& callManager = CallManagerInterfaceSingleton::getInstance(); - QStringList callList = callManager.getParticipantList(conf->getConfId()); + const QStringList callList = callManager.getParticipantList(conf->getConfId()); QList<QTreeWidgetItem*> buffer; - foreach (QString callId, callList) { + foreach (const QString& callId, callList) { if (SFLPhone::model()->getCall(callId)) { QTreeWidgetItem* item3 = extractItem(SFLPhone::model()->getIndex(callId)); insertItem(item3, SFLPhone::model()->getIndex(conf)); @@ -973,3 +974,4 @@ void CallViewOverlay::setAccessMessage(QString message) { m_accessMessage = message; } + diff --git a/kde/src/KSpeechInterfaceSingleton.cpp b/kde/src/KSpeechInterfaceSingleton.cpp index 5e748d54cab3fef2a180092ea9561dee650e6ddf..9aab1a96b9781f2a3a6ffbb509caa1708fc36aa5 100644 --- a/kde/src/KSpeechInterfaceSingleton.cpp +++ b/kde/src/KSpeechInterfaceSingleton.cpp @@ -30,4 +30,4 @@ OrgKdeKSpeechInterface* KSpeechInterfaceSingleton::getInstance() { m_pInstance->setApplicationName("SFLPhone KDE"); } return m_pInstance; -} \ No newline at end of file +} diff --git a/kde/src/KSpeechInterfaceSingleton.h b/kde/src/KSpeechInterfaceSingleton.h index b09ef1f42148ba9dacf56712e9cb3d7d09d9b96a..24b3197c3028365595d706e094b3342b8abf3bca 100644 --- a/kde/src/KSpeechInterfaceSingleton.h +++ b/kde/src/KSpeechInterfaceSingleton.h @@ -29,4 +29,4 @@ private: static OrgKdeKSpeechInterface* m_pInstance; }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/SFLPhone.cpp b/kde/src/SFLPhone.cpp index 6b6a3fd5158cb4dd105ab68f7b35bd65b608caef..afbf3bb3bf2f2309a1198e5333ea46210d1ae475 100755 --- a/kde/src/SFLPhone.cpp +++ b/kde/src/SFLPhone.cpp @@ -527,4 +527,4 @@ void SFLPhone::displayVideoDock(VideoRenderer* r) m_pVideoDW->setRenderer(r); m_pVideoDW->show(); } -#endif \ No newline at end of file +#endif diff --git a/kde/src/SFLPhone.h b/kde/src/SFLPhone.h index e43bd07a1684f3d249476a607a85eb6a6a6fd186..2aad310a48846737777739033d22aa49cb6d86e1 100755 --- a/kde/src/SFLPhone.h +++ b/kde/src/SFLPhone.h @@ -157,4 +157,4 @@ private slots: #endif }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/SFLPhoneAccessibility.cpp b/kde/src/SFLPhoneAccessibility.cpp index ce81b89c4d79d5780a1fed87a0a5836b9b9d40cf..879fcdb276fa6066faeb6ca49db396f8049dea93 100644 --- a/kde/src/SFLPhoneAccessibility.cpp +++ b/kde/src/SFLPhoneAccessibility.cpp @@ -59,9 +59,9 @@ SFLPhoneAccessibility* SFLPhoneAccessibility::getInstance() void SFLPhoneAccessibility::listCall() { if (SFLPhone::model()->getCallList().size()>0) { - KSpeechInterfaceSingleton::getInstance()->say(i18n("You currently have %1 calls").arg(QString::number(SFLPhone::model()->getCallList().size())), KSpeech::soPlainText); + KSpeechInterfaceSingleton::getInstance()->say(i18n("You currently have <numid>%1</numid> calls",SFLPhone::model()->getCallList().size()), KSpeech::soPlainText); foreach (Call* call,SFLPhone::model()->getCallList()) { - KSpeechInterfaceSingleton::getInstance()->say(i18n("Call from %1, number %2").arg(call->getPeerName()).arg(numberToDigit((!call->getPeerPhoneNumber().isEmpty())?call->getPeerPhoneNumber():call->getCallNumber())), KSpeech::soPlainText); + KSpeechInterfaceSingleton::getInstance()->say(i18n("Call from %1, number %2",call->getPeerName(),numberToDigit((!call->getPeerPhoneNumber().isEmpty())?call->getPeerPhoneNumber():call->getCallNumber())), KSpeech::soPlainText); } } else { @@ -75,7 +75,7 @@ QString SFLPhoneAccessibility::numberToDigit(QString number) QString toReturn; for(int i=0;i<number.count();i++) { if (i+1 < number.count() && (number[i] >= 0x30 && number[i] <= 0x39) && (number[i+1] >= 0x30 && number[i+1] <= 0x39)) - toReturn += number[i]+" "; + toReturn += QString(number[i])+' '; else toReturn += number[i]; } @@ -87,17 +87,17 @@ void SFLPhoneAccessibility::currentCallDetails() { foreach (Call* call,SFLPhone::model()->getCallList()) { if (call->isSelected()) { - QString toSay = i18n("The current call is %1").arg( i18n(call->toHumanStateName().toAscii() )); + QString toSay = i18n("The current call is %1",i18n(call->toHumanStateName().toAscii() )); if (!call->getPeerName().trimmed().isEmpty()) - toSay += i18n(",Your peer is %1").arg( numberToDigit(call->getPeerName()) ); + toSay += i18n(",Your peer is %1",numberToDigit(call->getPeerName())); if (!call->getPeerPhoneNumber().isEmpty()) - toSay += i18n(", the peer phone number is %1 ").arg( numberToDigit(call->getPeerPhoneNumber()) ); + toSay += i18n(", the peer phone number is %1 ",numberToDigit(call->getPeerPhoneNumber()) ); else if (!call->getCallNumber().isEmpty()) - toSay += i18n(", the phone number is %1 ").arg( numberToDigit(call->getCallNumber()) ); + toSay += i18n(", the phone number is %1 ",numberToDigit(call->getCallNumber())); int nSec = QDateTime::fromTime_t(call->getStartTimeStamp().toInt()).time().secsTo( QTime::currentTime() ); if (nSec>0) - toSay += i18n(" and you have been talking since %1 seconds").arg( nSec ); + toSay += i18n(" and you have been talking since %1 seconds",nSec ); KSpeechInterfaceSingleton::getInstance()->say(toSay, KSpeech::soPlainText); } @@ -108,4 +108,4 @@ void SFLPhoneAccessibility::currentCallDetails() void SFLPhoneAccessibility::say(QString message) { KSpeechInterfaceSingleton::getInstance()->say(message, KSpeech::soPlainText); -} \ No newline at end of file +} diff --git a/kde/src/SFLPhoneAccessibility.h b/kde/src/SFLPhoneAccessibility.h index 411bde9a7d083ae5b73a70bb0b0efa24de9dc298..d5e33e59af187db2502844c67e9c4c44da56f32e 100644 --- a/kde/src/SFLPhoneAccessibility.h +++ b/kde/src/SFLPhoneAccessibility.h @@ -40,4 +40,4 @@ public slots: void say(QString message); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/SFLPhoneView.cpp b/kde/src/SFLPhoneView.cpp index 9212b7217d413a71c7dd3a085857667689eac422..d7b70a5546f8123f86317896a47c54651ad52aa6 100755 --- a/kde/src/SFLPhoneView.cpp +++ b/kde/src/SFLPhoneView.cpp @@ -348,8 +348,8 @@ bool SFLPhoneView::selectCallPhoneNumber(Call** call2,Contact* contact) QHash<QString,QString> map ; QStringList list ; foreach (Contact::PhoneNumber* number, contact->getPhoneNumbers()) { - map[number->getType()+" ("+number->getNumber()+")"] = number->getNumber(); - list << number->getType()+" ("+number->getNumber()+")"; + map[number->getType()+" ("+number->getNumber()+')'] = number->getNumber(); + list << number->getType()+" ("+number->getNumber()+')'; } QString result = QInputDialog::getItem (this, i18n("Select phone number"), i18n("This contact have many phone number, please select the one you wish to call"), list, 0, false, &ok); if (ok) { @@ -595,7 +595,7 @@ void SFLPhoneView::updateStatusMessage() else { emit statusMessageChangeAsked(i18n("Using account") + " \'" + account->getAlias() - + "\' (" + account->getAccountRegistrationStatus() + ")"); + + "\' (" + account->getAccountRegistrationStatus() + ')'); } } @@ -893,4 +893,4 @@ void SFLPhoneView::sendMessage() m_pSendMessageLE->clear(); } -#include "SFLPhoneView.moc" \ No newline at end of file +#include "SFLPhoneView.moc" diff --git a/kde/src/SFLPhoneView.h b/kde/src/SFLPhoneView.h index 8755af06ea51695a7a4a25217fa6aa7ede4849aa..880efb27f8f9cdf896dfd19397874f00980f2177 100755 --- a/kde/src/SFLPhoneView.h +++ b/kde/src/SFLPhoneView.h @@ -207,8 +207,6 @@ signals: void recordCheckStateChangeAsked ( bool recordCheckState ); ///When a new call is comming void incomingCall(const Call * call); - - }; #endif // SFLPHONEVIEW_H diff --git a/kde/src/SFLPhoneapplication.cpp b/kde/src/SFLPhoneapplication.cpp index 2c16945569b6290861ecedffeffacfac2661708f..92b36a2fb798cda472c23b56c46484759e4a41a3 100755 --- a/kde/src/SFLPhoneapplication.cpp +++ b/kde/src/SFLPhoneapplication.cpp @@ -84,8 +84,6 @@ void SFLPhoneApplication::initializeMainWindow() } } - - /** * Initialize additional paths */ diff --git a/kde/src/conf/ConfigurationDialog.cpp b/kde/src/conf/ConfigurationDialog.cpp index ac8f470f196ac4cad1e08e065fb3532255f24588..e4fa1fdc65a18b32e4b43eacf33f43ac01311164 100755 --- a/kde/src/conf/ConfigurationDialog.cpp +++ b/kde/src/conf/ConfigurationDialog.cpp @@ -53,16 +53,16 @@ ConfigurationDialog::ConfigurationDialog(SFLPhoneView *parent) dlgVideo = new DlgVideo (this); #endif - addPage( dlgGeneral , i18n("General") , "sflphone-client-kde" ); - addPage( dlgDisplay , i18n("Display") , "applications-graphics" ); + addPage( dlgGeneral , i18nc("General settings","General") , "sflphone-client-kde" ); addPage( dlgAccounts , i18n("Accounts") , "user-identity" ); addPage( dlgAudio , i18n("Audio") , "audio-headset" ); addPage( dlgAddressBook , i18n("Address Book") , "x-office-address-book" ); addPage( dlgHooks , i18n("Hooks") , "insert-link" ); addPage( dlgAccessibility , i18n("Accessibility") , "preferences-desktop-accessibility" ); #ifdef ENABLE_VIDEO - addPage( dlgVideo , i18n("Video") , "camera-web" ); + addPage( dlgVideo , i18nc("Video conversation","Video") , "camera-web" ); #endif + addPage( dlgDisplay , i18nc("User interterface settings","Display") , "applications-graphics" ); connect(this, SIGNAL(applyClicked()), this, SLOT(applyCustomSettings())); connect(this, SIGNAL(okClicked()), this, SLOT(applyCustomSettings())); diff --git a/kde/src/conf/dlgaccessibility.cpp b/kde/src/conf/dlgaccessibility.cpp index 364a71f48dd145c6138d175c3d7c0a0d66e6f97f..2296fbce531c389f894976206ecda4ab9675b6ac 100644 --- a/kde/src/conf/dlgaccessibility.cpp +++ b/kde/src/conf/dlgaccessibility.cpp @@ -44,4 +44,4 @@ void DlgAccessibility::updateSettings() void DlgAccessibility::updateWidgets() { -} \ No newline at end of file +} diff --git a/kde/src/conf/dlgaccounts.cpp b/kde/src/conf/dlgaccounts.cpp index aaa679ee77985c3a4fb6b95e04d8a06e82e8d079..0cd1b2e2eff632a258d2db47b6674594743bc16e 100755 --- a/kde/src/conf/dlgaccounts.cpp +++ b/kde/src/conf/dlgaccounts.cpp @@ -731,4 +731,4 @@ void DlgAccounts::enablePublished() spinBox_pa_published_port->setDisabled(radioButton_pa_same_as_local->isChecked()); } -//#include <dlgaccount.moc> \ No newline at end of file +//#include <dlgaccount.moc> diff --git a/kde/src/conf/dlgaudio.cpp b/kde/src/conf/dlgaudio.cpp index 4f5233237e72fc6cdd3d1649bb1dfd0f979dd7c1..8e0141e8b8d594aabb5c74b30c4b89100c84c887 100755 --- a/kde/src/conf/dlgaudio.cpp +++ b/kde/src/conf/dlgaudio.cpp @@ -103,4 +103,4 @@ void DlgAudio::loadAlsaSettings() else { groupBox_alsa->setEnabled(false); } -} \ No newline at end of file +} diff --git a/kde/src/conf/dlgdisplay.cpp b/kde/src/conf/dlgdisplay.cpp index cf7c6d7302b5d609bfb3828d20bb0858d3f17e88..75ee2069e1e51b35d5c8a21532740577b864f036 100755 --- a/kde/src/conf/dlgdisplay.cpp +++ b/kde/src/conf/dlgdisplay.cpp @@ -30,5 +30,3 @@ DlgDisplay::DlgDisplay(QWidget *parent) DlgDisplay::~DlgDisplay() { } - - diff --git a/kde/src/conf/dlgdisplaybase.ui b/kde/src/conf/dlgdisplaybase.ui index 2d91e764f5eeaef3c2c4ffacd8add2dd9ac3a477..8b120b6e2f5cb668bd710b8c1ce34ec447270950 100755 --- a/kde/src/conf/dlgdisplaybase.ui +++ b/kde/src/conf/dlgdisplaybase.ui @@ -38,6 +38,9 @@ <layout class="QHBoxLayout" name="horizontalLayout_5"> <item> <widget class="QCheckBox" name="kcfg_notifOnCalls"> + <property name="accessibleDescription"> + <string comment="Enable notification on incoming calls"/> + </property> <property name="text"> <string>On incoming calls</string> </property> @@ -45,6 +48,9 @@ </item> <item> <widget class="QCheckBox" name="kcfg_notifOnMessages"> + <property name="accessibleDescription"> + <string comment="Enable notifications on messages"/> + </property> <property name="text"> <string>On messages</string> </property> @@ -77,6 +83,9 @@ <layout class="QHBoxLayout" name="horizontalLayout_6"> <item> <widget class="QCheckBox" name="kcfg_displayOnStart"> + <property name="accessibleDescription"> + <string comment="Show main window on start"/> + </property> <property name="text"> <string>On start</string> </property> @@ -84,6 +93,9 @@ </item> <item> <widget class="QCheckBox" name="kcfg_displayOnCalls"> + <property name="accessibleDescription"> + <string comment="Show main window on incoming calls"/> + </property> <property name="text"> <string>On incoming calls</string> </property> diff --git a/kde/src/conf/dlghooks.cpp b/kde/src/conf/dlghooks.cpp index 67f5cfa8060908d30b401381cf0286beafc929a9..ee5d6f4b5c712edc63dba92eca64606acf4836fa 100755 --- a/kde/src/conf/dlghooks.cpp +++ b/kde/src/conf/dlghooks.cpp @@ -30,5 +30,3 @@ DlgHooks::DlgHooks(QWidget *parent) DlgHooks::~DlgHooks() { } - - diff --git a/kde/src/conf/dlgvideo.cpp b/kde/src/conf/dlgvideo.cpp index e6755558d7baf0617232f37264d06c6d3bc8fd10..f808d9383f547e3b74f82d1b51bf24a4e4cbe2e9 100644 --- a/kde/src/conf/dlgvideo.cpp +++ b/kde/src/conf/dlgvideo.cpp @@ -28,7 +28,7 @@ DlgVideo::DlgVideo(QWidget *parent) { setupUi(this); - QList<VideoDevice*> devices = VideoDevice::getDeviceList(); + const QList<VideoDevice*> devices = VideoDevice::getDeviceList(); foreach(VideoDevice* dev,devices) { m_pDeviceCB->addItem(dev->getDeviceId()); } @@ -61,7 +61,7 @@ void DlgVideo::loadDevice(QString device) { QString curChan = m_pDevice->getChannel(); if (m_pDevice) { m_pChannelCB->clear(); - foreach(VideoChannel channel,m_pDevice->getChannelList()) { + foreach(const VideoChannel& channel,m_pDevice->getChannelList()) { m_pChannelCB->addItem(channel); if (channel == curChan) m_pChannelCB->setCurrentIndex(m_pChannelCB->count()-1); @@ -73,7 +73,7 @@ void DlgVideo::loadResolution(QString channel) { Resolution current = m_pDevice->getResolution(); m_pResolutionCB->clear(); - foreach(Resolution res,m_pDevice->getResolutionList(channel)) { + foreach(const Resolution& res,m_pDevice->getResolutionList(channel)) { m_pResolutionCB->addItem(res.toString()); if (current == res) { m_pResolutionCB->setCurrentIndex(m_pResolutionCB->count()-1); @@ -86,7 +86,7 @@ void DlgVideo::loadRate(QString resolution) { m_pRateCB->clear(); QString rate = m_pDevice->getRate(); - foreach(QString r,m_pDevice->getRateList(m_pChannelCB->currentText(),resolution)) { + foreach(const QString& r,m_pDevice->getRateList(m_pChannelCB->currentText(),resolution)) { m_pRateCB->addItem(r); if (r == rate) m_pRateCB->setCurrentIndex(m_pRateCB->count()-1); @@ -109,4 +109,4 @@ void DlgVideo::startStopPreview() m_pPreviewPB->setText(i18n("Stop preview")); VideoModel::getInstance()->startPreview(); } -} \ No newline at end of file +} diff --git a/kde/src/icons/conf-small.png b/kde/src/icons/conf-small.png index d8cbaa2482eef50a6d8866edebe848b299da975d..597f3f36ee54faf3127f3cd0a69bb65a41fab0e3 100644 Binary files a/kde/src/icons/conf-small.png and b/kde/src/icons/conf-small.png differ diff --git a/kde/src/icons/user-group-properties.svg b/kde/src/icons/user-group-properties.svg index 2e31743c18e398f274d3952f92ff94dac7d82882..acf4bde69d177d18f1e0c0d408e95c7bd902c4b7 100644 --- a/kde/src/icons/user-group-properties.svg +++ b/kde/src/icons/user-group-properties.svg @@ -20,9 +20,9 @@ sodipodi:docname="user-group-properties.svg" inkscape:output_extension="org.inkscape.output.svgz.inkscape" enable-background="new" - inkscape:export-filename="/home/pinheiro/pics/oxygen/scalable/actions/user-group-properties.png" - inkscape:export-xdpi="180" - inkscape:export-ydpi="180"> + inkscape:export-filename="/home/lepagee/sflphone/kde/src/icons/conf-small.png" + inkscape:export-xdpi="16.875" + inkscape:export-ydpi="16.875"> <defs id="defs1309"> <inkscape:perspective @@ -20661,8 +20661,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.546875" - inkscape:cx="116.43615" - inkscape:cy="147.59495" + inkscape:cx="8.9173483" + inkscape:cy="147.65435" inkscape:current-layer="layer1" showgrid="false" inkscape:document-units="px" @@ -20701,6 +20701,7 @@ <dc:title>Oxygen team</dc:title> </cc:Agent> </dc:contributor> + <dc:title></dc:title> </cc:Work> <cc:License rdf:about="http://creativecommons.org/licenses/LGPL/2.1/"> @@ -20727,13 +20728,13 @@ sodipodi:nodetypes="ccc" id="path2276" d="m 61.876564,-6.3601408 0,-3.3221988 0,3.3221988 z" - style="fill:#ffffff;fill-opacity:0.75688076;fill-rule:nonzero;stroke:none" + style="fill:#ffffff;fill-opacity:0.75688076000000004;fill-rule:nonzero;stroke:none;opacity:1" inkscape:connector-curvature="0" /> <path sodipodi:nodetypes="ccc" id="path2056" d="m 98.995768,4.1820081 0,-2.0740648 0,2.0740648 z" - style="fill:#ffffff;fill-opacity:0.75688076;fill-rule:nonzero;stroke:none" + style="fill:#ffffff;fill-opacity:0.75688076000000004;fill-rule:nonzero;stroke:none;opacity:1" inkscape:connector-curvature="0" /> <g inkscape:label="fill text" @@ -20743,38 +20744,14 @@ inkscape:label="fill text" id="g8311" transform="translate(251.48838,-10.509784)" /> - <path - sodipodi:nodetypes="ccc" - style="fill:#ffffff;fill-opacity:0.75688076;fill-rule:nonzero;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1" - id="path8227" - d="M -222.83965,222.55692 L -222.83965,219.76221 L -222.83965,222.55692 z" /> - <path - style="fill:#ffffff;fill-opacity:0.75688076;fill-rule:nonzero;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1" - d="M 251.92339,58.743178 L 251.92339,55.948469 L 251.92339,58.743178 z" - id="path8344" - sodipodi:nodetypes="ccc" /> - <path - style="fill:#ffffff;fill-opacity:0.75688076;fill-rule:nonzero;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1" - d="M 286.29894,112.13686 L 286.29894,110.61012 L 286.29894,112.13686 z" - id="path1561" - sodipodi:nodetypes="ccc" /> - <path - style="fill:#ffffff;fill-opacity:0.75688076;fill-rule:nonzero;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1" - d="M -171.49277,159.39375 L -171.49277,156.7133 L -171.49277,159.39375 z" - id="path6603" - sodipodi:nodetypes="ccc" /> - <path - style="fill:#ffffff;fill-opacity:0.75688076;fill-rule:nonzero;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1" - d="M -157.02689,31.572015 L -157.02689,29.310845 L -157.02689,31.572015 z" - id="path3507" - sodipodi:nodetypes="ccc" /> <g id="g8369" inkscape:label="fill text" transform="translate(36.562488,89.800696)" /> <g id="g6421" - transform="matrix(1.1887461,0,0,1.1887461,5.9888417,-50.22185)"> + transform="matrix(1.1887461,0,0,1.1887461,5.9888417,-50.22185)" + style="opacity:1"> <g transform="matrix(0.6331856,0,0,0.6331856,-0.4743811,47.766363)" id="g5295"> @@ -20823,7 +20800,7 @@ sodipodi:nodetypes="cccccccc" id="path3672" d="m 71.618505,51.517533 c -1.522233,7.240557 -5.77548,23.520516 -0.502979,27.394571 -0.650329,7.036923 -7.120819,9.695095 -15.089467,11.246857 l -1.508948,0 C 46.548466,88.607199 40.077973,85.949027 39.427648,78.912104 44.700149,75.038049 40.446902,58.75809 38.924665,51.517533 l 16.346924,7.445532 16.346916,-7.445532 z" - style="opacity:0.74906365;fill:url(#radialGradient6581);fill-opacity:1;fill-rule:evenodd;stroke:none" + style="opacity:0.74906364999999986;fill:url(#radialGradient6581);fill-opacity:1;fill-rule:evenodd;stroke:none" inkscape:connector-curvature="0" /> <path transform="matrix(1.0059645,0,0,1.0053055,-271.46562,-360.28069)" @@ -20902,7 +20879,7 @@ sodipodi:nodetypes="csscccc" id="path3497" d="m -39.6875,56.221855 c 5.490352,-0.197478 -5.37217,-1.720195 -9.01956,-2.301355 -5.891562,-0.938737 -13.74889,-4.05702 -14.84149,-6.96579 -0.71516,-1.90391 4.892,-4.76519 4.54855,-3.84253 -0.65577,1.86233 -1.47583,3.56833 3.125,7.625 2.30198,1.77729 4.87994,3.83927 8.375,4.125 2.5,0.26777 5.3125,1.832065 7.8125,1.359675 z" - style="opacity:0.88014981;fill:url(#linearGradient6600);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3625)" + style="opacity:0.88014981000000003;fill:url(#linearGradient6600);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3625)" inkscape:connector-curvature="0" /> <path transform="matrix(1.0059645,0,0,1.0053055,102.2077,-34.059089)" @@ -20916,7 +20893,7 @@ sodipodi:nodetypes="ccsccc" id="path3717" d="m -68.53033,81.05152 1.375,-2.5 c 0,0 -1.25,-3.125 -1.25,-4 0,-0.875 -0.88886,-3.4545 -0.88886,-3.4545 l -0.72791,0.47032 1.49177,9.48418 z" - style="opacity:0.33333333;fill:url(#linearGradient6604);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3775)" + style="opacity:0.33333332999999998;fill:url(#linearGradient6604);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3775)" inkscape:connector-curvature="0" /> <path sodipodi:nodetypes="cccssccsccssccz" @@ -20929,7 +20906,7 @@ sodipodi:nodetypes="ccccccscc" id="path3451" d="m -78.34358,152.98437 c -3.91725,-13.01958 -5.49592,-19.83203 3.53553,-26.87006 l 19.09189,-5.65686 -8.48528,-6.36395 -19.79899,7.77817 -10.6066,12.72792 c 0,0 -4.24265,9.8995 -1.41422,11.31371 2.82843,1.41422 9.8995,5.65686 9.8995,5.65686 l 7.77817,1.41421 z" - style="opacity:0.32209742;fill:url(#linearGradient6609);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" + style="opacity:0.32209742000000002;fill:url(#linearGradient6609);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" inkscape:connector-curvature="0" /> <path sodipodi:nodetypes="ccssccsccssccscsccssccsccssccc" @@ -20952,7 +20929,7 @@ clip-path="url(#clipPath3289)" id="path3261" d="m 463.75,435.375 c -1.27779,0.21006 -2.03383,1.22613 -2,2 -0.0793,0.0317 -0.17038,0.062 -0.25,0.0937 1.25202,4.0018 5.15727,8.27208 16.75,7.96875 11.50018,-0.3009 13.82799,-3.95877 16.46875,-7.875 -0.15115,-0.06 -0.3189,-0.12753 -0.46875,-0.1875 0.0338,-0.77387 -0.72221,-1.78994 -2,-2 -2.41363,3.74264 -4.00719,7.40137 -14.25,7.6875 -10.24281,0.28614 -13.36749,-3.94879 -14.25,-7.6875 z m 33.71875,3.25 c 0.0532,0.16802 0.10109,0.31159 0.0937,0.46875 4.20807,1.57746 8.83741,3.15593 13.5625,4.875 -4.63354,-1.95913 -9.30506,-3.67529 -13.65625,-5.34375 z" - style="fill:#f4f5f8;fill-opacity:1;fill-rule:evenodd;stroke:#98a2bf;stroke-width:0.14528722;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3283)" + style="fill:#f4f5f8;fill-opacity:1;fill-rule:evenodd;stroke:#98a2bf;stroke-width:0.14528721999999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3283)" inkscape:connector-curvature="0" /> <path transform="matrix(1.0059645,0,0,1.0053055,103.05489,-34.059089)" @@ -20970,7 +20947,7 @@ inkscape:connector-curvature="0" /> <path transform="matrix(-1.0059645,0,0,1.0053055,383.00502,-360.28069)" - style="opacity:0.32209742;fill:url(#linearGradient6620);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" + style="opacity:0.32209742000000002;fill:url(#linearGradient6620);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" d="m 294.15642,477.48437 c -3.91725,-13.01958 -5.49592,-19.83203 3.53553,-26.87006 l 19.09189,-5.65686 -8.48528,-6.36395 -19.79899,7.77817 -10.6066,12.72792 c 0,0 -4.24265,9.8995 -1.41422,11.31371 2.82843,1.41422 9.8995,5.65686 9.8995,5.65686 l 7.77817,1.41421 z" id="path3498" sodipodi:nodetypes="ccccccscc" @@ -20979,12 +20956,12 @@ transform="matrix(1.0059645,0,0,1.0053055,103.05489,-34.059089)" id="path3524" d="m -59.2517,120.45746 -7.07106,17.67767 7.07106,-17.67767 z" - style="opacity:0.06367044;fill:url(#linearGradient6622);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6624);stroke-width:0.29057443px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3574)" + style="opacity:0.06367043999999999;fill:url(#linearGradient6622);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6624);stroke-width:0.29057442999999999px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3574)" inkscape:connector-curvature="0" /> </g> <g clip-path="url(#clipPath9236)" - style="opacity:0.48097827;filter:url(#filter9218)" + style="opacity:0.48097826999999999;filter:url(#filter9218)" id="g9158" transform="matrix(0.6331856,0,0,0.6331856,-0.4743811,47.766363)"> <path @@ -21029,7 +21006,7 @@ style="fill:url(#radialGradient6626);fill-opacity:1;fill-rule:evenodd;stroke:none" inkscape:connector-curvature="0" /> <path - style="opacity:0.74906365;fill:url(#radialGradient6628);fill-opacity:1;fill-rule:evenodd;stroke:none" + style="opacity:0.74906364999999986;fill:url(#radialGradient6628);fill-opacity:1;fill-rule:evenodd;stroke:none" d="m 71.618505,51.517533 c -1.522233,7.240557 -5.77548,23.520516 -0.502979,27.394571 -0.650329,7.036923 -7.120819,9.695095 -15.089467,11.246857 l -1.508948,0 C 46.548466,88.607199 40.077973,85.949027 39.427648,78.912104 44.700149,75.038049 40.446902,58.75809 38.924665,51.517533 l 16.346924,7.445532 16.346916,-7.445532 z" id="path9172" sodipodi:nodetypes="cccccccc" @@ -21107,7 +21084,7 @@ mask="none" inkscape:connector-curvature="0" /> <path - style="opacity:0.88014981;fill:url(#linearGradient6648);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3625)" + style="opacity:0.88014981000000003;fill:url(#linearGradient6648);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3625)" d="m -39.6875,56.221855 c 5.490352,-0.197478 -5.37217,-1.720195 -9.01956,-2.301355 -5.891562,-0.938737 -13.74889,-4.05702 -14.84149,-6.96579 -0.71516,-1.90391 4.892,-4.76519 4.54855,-3.84253 -0.65577,1.86233 -1.47583,3.56833 3.125,7.625 2.30198,1.77729 4.87994,3.83927 8.375,4.125 2.5,0.26777 5.3125,1.832065 7.8125,1.359675 z" id="path9194" sodipodi:nodetypes="csscccc" @@ -21121,7 +21098,7 @@ transform="matrix(1.0059645,0,0,1.0053055,102.2077,-34.059089)" inkscape:connector-curvature="0" /> <path - style="opacity:0.33333333;fill:url(#linearGradient6654);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3775)" + style="opacity:0.33333332999999998;fill:url(#linearGradient6654);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3775)" d="m -68.53033,81.05152 1.375,-2.5 c 0,0 -1.25,-3.125 -1.25,-4 0,-0.875 -0.88886,-3.4545 -0.88886,-3.4545 l -0.72791,0.47032 1.49177,9.48418 z" id="path9198" sodipodi:nodetypes="ccsccc" @@ -21134,7 +21111,7 @@ sodipodi:nodetypes="cccssccsccssccz" inkscape:connector-curvature="0" /> <path - style="opacity:0.32209742;fill:url(#linearGradient6659);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" + style="opacity:0.32209742000000002;fill:url(#linearGradient6659);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" d="m -78.34358,152.98437 c -3.91725,-13.01958 -5.49592,-19.83203 3.53553,-26.87006 l 19.09189,-5.65686 -8.48528,-6.36395 -19.79899,7.77817 -10.6066,12.72792 c 0,0 -4.24265,9.8995 -1.41422,11.31371 2.82843,1.41422 9.8995,5.65686 9.8995,5.65686 l 7.77817,1.41421 z" id="path9202" sodipodi:nodetypes="ccccccscc" @@ -21156,7 +21133,7 @@ transform="matrix(1.0059645,0,0,1.0053055,103.05489,-34.059089)" inkscape:connector-curvature="0" /> <path - style="fill:#f4f5f8;fill-opacity:1;fill-rule:evenodd;stroke:#98a2bf;stroke-width:0.14528722;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3283)" + style="fill:#f4f5f8;fill-opacity:1;fill-rule:evenodd;stroke:#98a2bf;stroke-width:0.14528721999999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3283)" d="m 463.75,435.375 c -1.27779,0.21006 -2.03383,1.22613 -2,2 -0.0793,0.0317 -0.17038,0.062 -0.25,0.0937 1.25202,4.0018 5.15727,8.27208 16.75,7.96875 11.50018,-0.3009 13.82799,-3.95877 16.46875,-7.875 -0.15115,-0.06 -0.3189,-0.12753 -0.46875,-0.1875 0.0338,-0.77387 -0.72221,-1.78994 -2,-2 -2.41363,3.74264 -4.00719,7.40137 -14.25,7.6875 -10.24281,0.28614 -13.36749,-3.94879 -14.25,-7.6875 z m 33.71875,3.25 c 0.0532,0.16802 0.10109,0.31159 0.0937,0.46875 4.20807,1.57746 8.83741,3.15593 13.5625,4.875 -4.63354,-1.95913 -9.30506,-3.67529 -13.65625,-5.34375 z" id="path9208" clip-path="url(#clipPath3289)" @@ -21181,11 +21158,11 @@ sodipodi:nodetypes="ccccccscc" id="path9214" d="m 294.15642,477.48437 c -3.91725,-13.01958 -5.49592,-19.83203 3.53553,-26.87006 l 19.09189,-5.65686 -8.48528,-6.36395 -19.79899,7.77817 -10.6066,12.72792 c 0,0 -4.24265,9.8995 -1.41422,11.31371 2.82843,1.41422 9.8995,5.65686 9.8995,5.65686 l 7.77817,1.41421 z" - style="opacity:0.32209742;fill:url(#linearGradient6672);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" + style="opacity:0.32209742000000002;fill:url(#linearGradient6672);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3493)" transform="matrix(-1.0059645,0,0,1.0053055,383.00502,-360.28069)" inkscape:connector-curvature="0" /> <path - style="opacity:0.06367044;fill:url(#linearGradient6675);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6678);stroke-width:0.29057443px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3574)" + style="opacity:0.06367043999999999;fill:url(#linearGradient6675);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6678);stroke-width:0.29057442999999999px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3574)" d="m -59.2517,120.45746 -7.07106,17.67767 7.07106,-17.67767 z" id="path9216" transform="matrix(1.0059645,0,0,1.0053055,103.05489,-34.059089)" @@ -21231,7 +21208,8 @@ transform="translate(-228.74138,-144.68451)" /> <g id="g6483" - transform="matrix(1.1887461,0,0,1.1887461,-28.592863,-33.315238)"> + transform="matrix(1.1887461,0,0,1.1887461,-28.592863,-33.315238)" + style="opacity:1"> <g transform="matrix(0.6451986,0,0,0.6451986,51.089015,45.595965)" id="g5197"> @@ -21267,7 +21245,7 @@ transform="matrix(1.0198682,0,0,1.0198682,11.511982,-2.4685485)" inkscape:connector-curvature="0" /> <path - style="opacity:0.72554351;fill:url(#radialGradient6684);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4437)" + style="opacity:0.72554350999999984;fill:url(#radialGradient6684);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4437)" d="m 27.565776,88.722219 c -1.80779,1.353248 16.76352,7.051674 18.40553,6.641171 l -4.3642,4.553946 c -6.38278,-3.215218 -12.78271,-6.423579 -16.6978,-10.625874 l 2.65647,-0.569243 z" id="path4235" sodipodi:nodetypes="ccccc" @@ -21301,14 +21279,14 @@ inkscape:connector-curvature="0" /> </g> <path - style="opacity:0.39402173;fill:url(#radialGradient6690);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" + style="opacity:0.39402173000000001;fill:url(#radialGradient6690);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" d="M 61.109016,71.794549 58.962266,90.578616 67.549266,86 61.109016,71.794549 z" id="path4554" sodipodi:nodetypes="cccc" transform="matrix(1.0198682,0,0,1.0198682,11.511982,-2.4685485)" inkscape:connector-curvature="0" /> <path - style="opacity:0.72554351;fill:url(#radialGradient6692);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4864)" + style="opacity:0.72554350999999984;fill:url(#radialGradient6692);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4864)" d="m 51.790356,90.566037 2.28092,4.15933 3.22013,-5.098533 -5.50105,0.939203 z" id="path4600" transform="matrix(1.5217463,0,0,1.5217463,-16.814461,-46.426759)" @@ -21325,7 +21303,7 @@ sodipodi:nodetypes="cccc" id="path4700" d="M 61.109016,71.794549 58.962266,90.578616 67.549266,86 61.109016,71.794549 z" - style="opacity:0.39402173;fill:url(#radialGradient6696);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" + style="opacity:0.39402173000000001;fill:url(#radialGradient6696);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" inkscape:connector-curvature="0" /> <path style="fill:url(#linearGradient6698);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4792)" @@ -21346,7 +21324,7 @@ sodipodi:nodetypes="cccsccccccscccc" id="path5249" d="m 36.73125,80.45 c -2.934573,0.03808 -7.802702,1.294984 -11.09375,2.58125 0.536273,12.404095 0.46018,24.65662 -0.125,36.78125 13.583481,3.99704 28.407737,4.375 38.71875,4.375 10.240192,0 24.921836,-0.96472 38.4375,-5.1875 -0.55898,-11.85965 -0.64931,-24.641464 -0.125,-36.76875 -3.794194,-1.45398 -8.127927,-1.837511 -11.0625,-2.311648 -0.285848,12.442494 -0.976921,24.893948 -2.6875,36.267898 -8.290769,0.96735 -16.196466,1.05176 -24.15625,0.75 l 0,-0.0313 c -0.177592,0.007 -0.353724,-0.007 -0.53125,0 -0.177526,-0.007 -0.353658,0.007 -0.53125,0 l 0,0.0313 c -7.959784,0.30176 -15.865484,0.21735 -24.15625,-0.75 C 37.708171,104.81355 37.0171,92.892494 36.73125,80.45 z" - style="opacity:0.17934786;fill:#1a0000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5562)" + style="opacity:0.17934786000000000;fill:#1a0000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5562)" clip-path="url(#clipPath5269)" transform="matrix(0.9535685,0,0,0.9535685,3.9953313,5.7662092)" inkscape:connector-curvature="0" /> @@ -21449,7 +21427,7 @@ sodipodi:nodetypes="ccc" id="path5074" d="M 71.233153,18.008603 C 59.799285,15.192007 49.685857,24.023037 45.223392,30.855163 49.516013,23.749051 59.337233,14.821197 71.233153,18.008603 z" - style="opacity:0.78532607;fill:url(#linearGradient6721);fill-opacity:1;fill-rule:evenodd;stroke:none" + style="opacity:0.78532606999999999;fill:url(#linearGradient6721);fill-opacity:1;fill-rule:evenodd;stroke:none" inkscape:connector-curvature="0" /> <path style="fill:url(#linearGradient6723);fill-opacity:1;fill-rule:evenodd;stroke:none" @@ -21488,13 +21466,13 @@ transform="matrix(0.9535685,0,0,0.9535685,3.9953313,5.7662092)" inkscape:connector-curvature="0" /> <path - style="opacity:0.625;fill:url(#linearGradient6739);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5570)" + style="opacity:0.62500000000000000;fill:url(#linearGradient6739);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5570)" d="m 68.350212,22.596593 c -8.06505,0.849185 -14.38309,5.569321 -19.191316,9.909517 4.437743,-4.755316 11.563161,-10.110777 19.191316,-9.909517 z" id="path5408" sodipodi:nodetypes="ccc" inkscape:connector-curvature="0" /> <path - style="opacity:0.39673911;fill:#0d064f;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter9154)" + style="opacity:0.39673911000000001;fill:#0d064f;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter9154)" d="m 116.5505,112.25 c -16.19508,9.2196 -38.221322,10.9375 -52.062501,10.9375 -13.841179,0 -35.804908,-0.6554 -52,-9.875 l 0,1 c 16.195092,9.2196 38.158821,9.875 52,9.875 13.841179,0 35.867421,-1.7179 52.062501,-10.9375 l 0,-1 z" id="path5427" sodipodi:nodetypes="csccscc" @@ -21513,7 +21491,7 @@ style="fill:url(#linearGradient6744);fill-opacity:1;fill-rule:evenodd;stroke:none" inkscape:connector-curvature="0" /> <path - style="opacity:0.19293476;fill:url(#linearGradient6746);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5614)" + style="opacity:0.19293476000000001;fill:url(#linearGradient6746);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5614)" d="m 83.454927,93.115304 c 0.158689,5.64027 -0.394044,13.336806 0.536688,18.918236 0.45717,-6.15451 -0.342622,-13.290602 -0.536688,-18.918236 z" id="path5596" sodipodi:nodetypes="ccc" @@ -21563,7 +21541,7 @@ sodipodi:nodetypes="ccccc" id="path8411" d="m 27.565776,88.722219 c -1.80779,1.353248 16.76352,7.051674 18.40553,6.641171 l -4.3642,4.553946 c -6.38278,-3.215218 -12.78271,-6.423579 -16.6978,-10.625874 l 2.65647,-0.569243 z" - style="opacity:0.72554351;fill:url(#radialGradient6752);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4437)" + style="opacity:0.72554350999999984;fill:url(#radialGradient6752);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4437)" inkscape:connector-curvature="0" /> <path transform="matrix(1.0198682,0,0,1.0198682,11.511982,-3.422117)" @@ -21597,13 +21575,13 @@ sodipodi:nodetypes="cccc" id="path8423" d="M 61.109016,71.794549 58.962266,90.578616 67.549266,86 61.109016,71.794549 z" - style="opacity:0.39402173;fill:url(#radialGradient6758);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" + style="opacity:0.39402173000000001;fill:url(#radialGradient6758);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" inkscape:connector-curvature="0" /> <path transform="matrix(1.5217463,0,0,1.5217463,-16.814461,-46.426759)" id="path8425" d="m 51.790356,90.566037 2.28092,4.15933 3.22013,-5.098533 -5.50105,0.939203 z" - style="opacity:0.72554351;fill:url(#radialGradient6760);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4864)" + style="opacity:0.72554350999999984;fill:url(#radialGradient6760);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4864)" inkscape:connector-curvature="0" /> <path transform="matrix(1.0198682,0,0,1.0198682,13.419119,-2.4685485)" @@ -21613,7 +21591,7 @@ style="fill:url(#linearGradient6762);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4684)" inkscape:connector-curvature="0" /> <path - style="opacity:0.39402173;fill:url(#radialGradient6764);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" + style="opacity:0.39402173000000001;fill:url(#radialGradient6764);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4596)" d="M 61.109016,71.794549 58.962266,90.578616 67.549266,86 61.109016,71.794549 z" id="path8429" sodipodi:nodetypes="cccc" @@ -21637,7 +21615,7 @@ <path transform="matrix(0.9535685,0,0,0.9535685,3.9953313,5.7662092)" clip-path="url(#clipPath5269)" - style="opacity:0.17934786;fill:#1a0000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5562)" + style="opacity:0.17934786000000000;fill:#1a0000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5562)" d="m 36.73125,80.45 c -2.934573,0.03808 -7.802702,1.294984 -11.09375,2.58125 0.536273,12.404095 0.46018,24.65662 -0.125,36.78125 13.583481,3.99704 28.407737,4.375 38.71875,4.375 10.240192,0 24.921836,-0.96472 38.4375,-5.1875 -0.55898,-11.85965 -0.64931,-24.641464 -0.125,-36.76875 -3.794194,-1.45398 -8.127927,-1.837511 -11.0625,-2.311648 -0.285848,12.442494 -0.976921,24.893948 -2.6875,36.267898 -8.290769,0.96735 -16.196466,1.05176 -24.15625,0.75 l 0,-0.0313 c -0.177592,0.007 -0.353724,-0.007 -0.53125,0 -0.177526,-0.007 -0.353658,0.007 -0.53125,0 l 0,0.0313 c -7.959784,0.30176 -15.865484,0.21735 -24.15625,-0.75 C 37.708171,104.81355 37.0171,92.892494 36.73125,80.45 z" id="path8435" sodipodi:nodetypes="cccsccccccscccc" @@ -21738,7 +21716,7 @@ style="fill:url(#linearGradient6784);fill-opacity:1;fill-rule:evenodd;stroke:none" inkscape:connector-curvature="0" /> <path - style="opacity:0.78532607;fill:url(#linearGradient6786);fill-opacity:1;fill-rule:evenodd;stroke:none" + style="opacity:0.78532606999999999;fill:url(#linearGradient6786);fill-opacity:1;fill-rule:evenodd;stroke:none" d="M 71.233153,18.008603 C 59.799285,15.192007 49.685857,24.023037 45.223392,30.855163 49.516013,23.749051 59.337233,14.821197 71.233153,18.008603 z" id="path8465" sodipodi:nodetypes="ccc" @@ -21783,14 +21761,14 @@ sodipodi:nodetypes="ccc" id="path8479" d="m 68.350212,22.596593 c -8.06505,0.849185 -14.38309,5.569321 -19.191316,9.909517 4.437743,-4.755316 11.563161,-10.110777 19.191316,-9.909517 z" - style="opacity:0.625;fill:url(#linearGradient6800);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5570)" + style="opacity:0.62500000000000000;fill:url(#linearGradient6800);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5570)" inkscape:connector-curvature="0" /> <path transform="matrix(0.9535685,0,0,0.9535685,3.9953313,6.7662092)" sodipodi:nodetypes="csccscc" id="path8481" d="m 116.5505,112.25 c -16.19508,9.2196 -38.221322,10.9375 -52.062501,10.9375 -13.841179,0 -35.804908,-0.6554 -52,-9.875 l 0,1 c 16.195092,9.2196 38.158821,9.875 52,9.875 13.841179,0 35.867421,-1.7179 52.062501,-10.9375 l 0,-1 z" - style="opacity:0.39673911;fill:#0d064f;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter9154)" + style="opacity:0.39673911000000001;fill:#0d064f;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter9154)" inkscape:connector-curvature="0" /> <path sodipodi:nodetypes="cccc" @@ -21808,7 +21786,7 @@ sodipodi:nodetypes="ccc" id="path8487" d="m 83.454927,93.115304 c 0.158689,5.64027 -0.394044,13.336806 0.536688,18.918236 0.45717,-6.15451 -0.342622,-13.290602 -0.536688,-18.918236 z" - style="opacity:0.19293476;fill:url(#linearGradient6806);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5614)" + style="opacity:0.19293476000000001;fill:url(#linearGradient6806);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter5614)" inkscape:connector-curvature="0" /> </g> <g diff --git a/kde/src/klib/AkonadiBackend.cpp b/kde/src/klib/AkonadiBackend.cpp index 394c404a5a2368696004540aff128a1b0c4c29fc..72c8f0372b74622b45fd9e4a3ab769c658f16743 100644 --- a/kde/src/klib/AkonadiBackend.cpp +++ b/kde/src/klib/AkonadiBackend.cpp @@ -23,6 +23,7 @@ //Qt #include <QtCore/QTimer> #include <QtCore/QObject> +#include <QtCore/QPointer> //KDE #include <KDebug> @@ -99,10 +100,10 @@ Contact* AkonadiBackend::getContactByPhone(const QString& phoneNumber,bool resol } if (!a) a = AccountList::getInstance()->getDefaultAccount(); - else if (number.indexOf("@") == -1 && a) - return m_ContactByPhone[number+"@"+a->getAccountHostname()]; + else if (number.indexOf('@') == -1 && a) + return m_ContactByPhone[number+'@'+a->getAccountHostname()]; - if (resolveDNS && number.indexOf("@") != -1 && !getHostNameFromPhone(number).isEmpty() && m_ContactByPhone[getUserFromPhone(number)]) { + if (resolveDNS && number.indexOf('@') != -1 && !getHostNameFromPhone(number).isEmpty() && m_ContactByPhone[getUserFromPhone(number)]) { foreach (Account* a, AccountList::getInstance()->getAccounts()) { if (a->getAccountHostname() == getHostNameFromPhone(number)) return m_ContactByPhone[getUserFromPhone(number)]; @@ -175,9 +176,9 @@ ContactList AkonadiBackend::update(Akonadi::Collection collection) KABC::Addressee tmp = item.payload<KABC::Addressee>(); Contact* aContact = new Contact(); - KABC::PhoneNumber::List numbers = tmp.phoneNumbers(); + const KABC::PhoneNumber::List numbers = tmp.phoneNumbers(); PhoneNumbers newNumbers; - foreach (KABC::PhoneNumber number, numbers) { + foreach (const KABC::PhoneNumber& number, numbers) { newNumbers << new Contact::PhoneNumber(number.number(),number.typeLabel()); QString number2 = number.number(); if (number2.left(5) == "<sip:") @@ -186,7 +187,7 @@ ContactList AkonadiBackend::update(Akonadi::Collection collection) number2 = number2.remove(number2.size()-1,1); m_ContactByPhone[number2] = aContact; if (number2.size() <= 6 && defaultAccount && !defaultAccount->getAccountHostname().isEmpty()) - m_ContactByPhone[number2+"@"+defaultAccount->getAccountHostname()] = aContact; + m_ContactByPhone[number2+'@'+defaultAccount->getAccountHostname()] = aContact; } m_ContactByUid[tmp.uid()] = aContact; @@ -224,9 +225,9 @@ void AkonadiBackend::editContact(Contact* contact,QWidget* parent) } if ( item.isValid() ) { - Akonadi::ContactEditor *editor = new Akonadi::ContactEditor( Akonadi::ContactEditor::EditMode, parent ); + QPointer<Akonadi::ContactEditor> editor = new Akonadi::ContactEditor( Akonadi::ContactEditor::EditMode, parent ); editor->loadContact(item); - KDialog* dlg = new KDialog(parent); + QPointer<KDialog> dlg = new KDialog(parent); dlg->setMainWidget(editor); dlg->exec(); if ( !editor->saveContact() ) { @@ -260,11 +261,11 @@ void AkonadiBackend::addNewContact(Contact* contact,QWidget* parent) //aContact->setPhoneNumbers (newNumbers );//TODO - Akonadi::ContactEditor *editor = new Akonadi::ContactEditor( Akonadi::ContactEditor::CreateMode, parent ); + QPointer<Akonadi::ContactEditor> editor = new Akonadi::ContactEditor( Akonadi::ContactEditor::CreateMode, parent ); editor->setContactTemplate(newContact); - KDialog* dlg = new KDialog(parent); + QPointer<KDialog> dlg = new KDialog(parent); dlg->setMainWidget(editor); dlg->exec(); @@ -272,6 +273,7 @@ void AkonadiBackend::addNewContact(Contact* contact,QWidget* parent) kDebug() << "Unable to save new contact to storage"; return; } + delete dlg; } //addNewContact ///Implement virtual pure method @@ -298,16 +300,17 @@ void AkonadiBackend::addPhoneNumber(Contact* contact, QString number, QString ty KABC::Addressee payload = item.payload<KABC::Addressee>(); payload.insertPhoneNumber(KABC::PhoneNumber(number,nameToType(type))); item.setPayload<KABC::Addressee>(payload); - Akonadi::ContactEditor *editor = new Akonadi::ContactEditor( Akonadi::ContactEditor::EditMode, (QWidget*)nullptr ); + QPointer<Akonadi::ContactEditor> editor = new Akonadi::ContactEditor( Akonadi::ContactEditor::EditMode, (QWidget*)nullptr ); editor->loadContact(item); - KDialog* dlg = new KDialog(0); + QPointer<KDialog> dlg = new KDialog(0); dlg->setMainWidget(editor); dlg->exec(); if ( !editor->saveContact() ) { kDebug() << "Unable to save new contact to storage"; return; } + delete dlg; delete editor; } else { @@ -325,7 +328,7 @@ void AkonadiBackend::addPhoneNumber(Contact* contact, QString number, QString ty ///Called when a new collection is added void AkonadiBackend::collectionsReceived( const Akonadi::Collection::List& list) { - foreach (Akonadi::Collection coll, list) { + foreach (const Akonadi::Collection& coll, list) { update(coll); emit collectionChanged(); } @@ -335,4 +338,4 @@ void AkonadiBackend::collectionsReceived( const Akonadi::Collection::List& list ContactList AkonadiBackend::update_slot() { return m_pContacts;//update(m_Collection); -} \ No newline at end of file +} diff --git a/kde/src/klib/AkonadiBackend.h b/kde/src/klib/AkonadiBackend.h index a56d12ac1ca1e8918ae4156e2a8a484f616f3d12..8a26dc336f7c5d27336f9e4c901969de90e716ca 100644 --- a/kde/src/klib/AkonadiBackend.h +++ b/kde/src/klib/AkonadiBackend.h @@ -81,4 +81,4 @@ public slots: signals: }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/klib/ConfigurationSkeleton.cpp b/kde/src/klib/ConfigurationSkeleton.cpp index 5a064a2040e879e0bd628a1223baa8003a6dd8eb..03c7d6869ff71c53fca272e7bd34b5728c555523 100755 --- a/kde/src/klib/ConfigurationSkeleton.cpp +++ b/kde/src/klib/ConfigurationSkeleton.cpp @@ -255,4 +255,4 @@ void ConfigurationSkeleton::writeConfig() // { // // ConfigurationSkeletonBase::writeConfig(); -// } \ No newline at end of file +// } diff --git a/kde/src/klib/HelperFunctions.cpp b/kde/src/klib/HelperFunctions.cpp index 61c21f6c9641c5e6e469c12dfc60371713915422..15c9ea5fdeaf562e212aa258646760ca632bb5ed 100644 --- a/kde/src/klib/HelperFunctions.cpp +++ b/kde/src/klib/HelperFunctions.cpp @@ -44,7 +44,7 @@ ContactHash HelperFunctions::toHash(QList<Contact*> contacts) { } else { conth["phoneNumber"] = QString::number(cont->getPhoneNumbers().size())+i18n(" numbers"); - conth["phoneType" ] = ""; + conth["phoneType" ].clear(); } hash[contacts[i]->getUid()] = conth; } @@ -68,10 +68,10 @@ QString HelperFunctions::normStrippped(QString str) QString HelperFunctions::escapeHtmlEntities(QString str) { while (str.indexOf('<') != -1) { - str = str.replace("<","<"); + str = str.replace('<',"<"); } while (str.indexOf('>') != -1) { - str = str.replace(">",">"); + str = str.replace('>',">"); } return str; } @@ -80,4 +80,4 @@ QString HelperFunctions::escapeHtmlEntities(QString str) void HelperFunctions::displayNoAccountMessageBox(QWidget* parent) { KMessageBox::error(parent,i18n("No registered accounts")); -} \ No newline at end of file +} diff --git a/kde/src/klib/HelperFunctions.h b/kde/src/klib/HelperFunctions.h index 326550b26827e73f53ad38d3194a68dc56cde5f4..c5baf6ef9f13f20ba97dbc9597a8b5599415cd65 100644 --- a/kde/src/klib/HelperFunctions.h +++ b/kde/src/klib/HelperFunctions.h @@ -42,4 +42,4 @@ public: static QString escapeHtmlEntities(QString str); static void displayNoAccountMessageBox(QWidget* parent = nullptr); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/klib/SortableDockCommon.h b/kde/src/klib/SortableDockCommon.h index a86af26ec78944cb3b6547ffd2bf5164eba3d50b..0ba4d99da00befcfce2e82da81292fe2d0ad05ca 100644 --- a/kde/src/klib/SortableDockCommon.h +++ b/kde/src/klib/SortableDockCommon.h @@ -126,4 +126,4 @@ class LIB_EXPORT StaticEventHandler : public QObject #include "SortableDockCommon.hpp" -#endif \ No newline at end of file +#endif diff --git a/kde/src/klib/SortableDockCommon.hpp b/kde/src/klib/SortableDockCommon.hpp index 0633c09503b6b60b0b837486f1c159a12a51c8f5..22409fb01b668ac17c96f19dab206cb7986e0958 100644 --- a/kde/src/klib/SortableDockCommon.hpp +++ b/kde/src/klib/SortableDockCommon.hpp @@ -190,7 +190,7 @@ CALLMODEL_TEMPLATE void SORTABLE_T::setContactCategory(QList<Contact*> contacts, category = QString(cont->getFormattedName().trimmed()[0]); break; case ContactSortingMode::Organisation: - category = (cont->getOrganization().isEmpty())?i18n("Unknown"):cont->getOrganization(); + category = (cont->getOrganization().isEmpty())?i18nc("Unknown category","Unknown"):cont->getOrganization(); break; case ContactSortingMode::Recently_used: if (recentlyUsed.find(cont) != recentlyUsed.end()) @@ -202,7 +202,7 @@ CALLMODEL_TEMPLATE void SORTABLE_T::setContactCategory(QList<Contact*> contacts, category = i18n("TODO"); break; case ContactSortingMode::Department: - category = (cont->getDepartment().isEmpty())?i18n("Unknown"):cont->getDepartment();; + category = (cont->getDepartment().isEmpty())?i18nc("Unknown category","Unknown"):cont->getDepartment();; break; default: break; diff --git a/kde/src/klib/dataengine/sflphonEngine.cpp b/kde/src/klib/dataengine/sflphonEngine.cpp index fe069e771be20299cafcee1a8eab396ef948f016..3147f769856244648e97b41811c0e53b4a56afde 100644 --- a/kde/src/klib/dataengine/sflphonEngine.cpp +++ b/kde/src/klib/dataengine/sflphonEngine.cpp @@ -169,7 +169,7 @@ void SFLPhoneEngine::updateCallList() QStringList keys; keys << "peerName" << "peerNumber" << "stateName" << "state" << "id"; QHash<QString,QVariant> fake; - foreach (QString key, keys) { + foreach (const QString& key, keys) { fake[key] = ""; } setData("calls", "fake",fake ); @@ -210,13 +210,13 @@ void SFLPhoneEngine::updateBookmarkList() } //TODO Wont work for now - foreach (QString nb, ConfigurationSkeleton::bookmarkList()) { + foreach (const QString& nb, ConfigurationSkeleton::bookmarkList()) { i++; QHash<QString,QVariant> pop; /* KEY VALUE */ /**/pop["peerName" ] = "TODO" ; /**/pop["peerNumber" ] = nb ; - /**/pop["section" ] = "1" ; + /**/pop["section" ] = '1' ; /**/pop["listPriority" ] = 0 ; /**/pop["id" ] = i ; /* */ @@ -247,8 +247,8 @@ void SFLPhoneEngine::updateCollection() if (!list.size()) return; - ContactHash hash = HelperFunctions::toHash(list); - foreach (SerializedContact cont, hash) { + const ContactHash hash = HelperFunctions::toHash(list); + foreach (const SerializedContact& cont, hash) { if (!m_hContacts[hash.key(cont)].size()) { m_hContacts[hash.key(cont)] = cont; } @@ -256,8 +256,8 @@ void SFLPhoneEngine::updateCollection() removeAllData("contacts"); int i=0; - foreach (SerializedContact cont, m_hContacts) { - cont["section"] = "test"; + foreach (const SerializedContact& cont, m_hContacts) { +// cont["section"] = "test"; setData("contacts", QString::number(i), QVariant(cont)); i++; } @@ -275,8 +275,8 @@ void SFLPhoneEngine::updateContacts() "department"; QHash<QString,QVariant> fake; - foreach(QString key,keys) { - fake[key]=""; + foreach(const QString& key,keys) { + fake[key].clear(); } setData("contacts", "fake",fake ); } diff --git a/kde/src/klib/dataengine/sflphoneService.cpp b/kde/src/klib/dataengine/sflphoneService.cpp index ad508512b9fbd219852aa908e22b2b160bdb5409..b4ae9b88de8b680451236ff7ee44973416bcde23 100644 --- a/kde/src/klib/dataengine/sflphoneService.cpp +++ b/kde/src/klib/dataengine/sflphoneService.cpp @@ -162,4 +162,4 @@ ServiceJob *SFLPhoneService::createJob(const QString &operation, QMap<QString, Q m_engine->setData(operation, parameters["query"]); return 0; -} \ No newline at end of file +} diff --git a/kde/src/lib/Account.cpp b/kde/src/lib/Account.cpp index 2351cb7c295e70932956c22f39831b3747187bc5..ac2b36cecde90497f36ccfffe21ec689a979b0df 100644 --- a/kde/src/lib/Account.cpp +++ b/kde/src/lib/Account.cpp @@ -494,23 +494,24 @@ bool Account::operator==(const Account& a)const * * ****************************************************************************/ #ifdef ENABLE_VIDEO -void Account::setActiveVideoCodecList(QList<VideoCodec*> codecs) +void Account::setActiveVideoCodecList(const QList<VideoCodec*>& codecs) { - QStringList codecs; + QStringList codecs2; VideoInterface& interface = VideoInterfaceSingleton::getInstance(); foreach(VideoCodec* codec,codecs) { - codecs << codecs->getName(); + codecs2 << codecs->getName(); } - interface.setActiveCodecList(codecs,m_pAccountId); + interface.setActiveCodecList(codecs2,m_pAccountId); } QList<VideoCodec*> Account::getActiveVideoCodecList() { QList<VideoCodec*> codecs; VideoInterface& interface = VideoInterfaceSingleton::getInstance(); - foreach (QString codec, interface.getActiveCodecList(m_pAccountId)) { + const QStringList activeCodecList = interface.getActiveCodecList(m_pAccountId); + foreach (const QString& codec, activeCodecList) { codecs << VideoCodec::getCodec(codec); } } -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/Account.h b/kde/src/lib/Account.h index 07d672395ea36cf31952b12508eb6261837dac97..2e66943fc927f62d64c461f1bd0085abec325353 100644 --- a/kde/src/lib/Account.h +++ b/kde/src/lib/Account.h @@ -176,7 +176,7 @@ class LIB_EXPORT Account : public QObject { void setAccountDetails (const MapStringString& m ); bool setAccountDetail (const QString& param, const QString& val ); #ifdef ENABLE_VIDEO - void setActiveVideoCodecList(QList<VideoCodec*> codecs); + void setActiveVideoCodecList(const QList<VideoCodec*>& codecs); QList<VideoCodec*> getActiveVideoCodecList(); #endif ///Set the account alias diff --git a/kde/src/lib/AccountList.cpp b/kde/src/lib/AccountList.cpp index 620f16e3a2a37c6268cacc9aa9389ba0a675951a..0aeb5edcc3958841af92ae8b1699985bc78d6018 100644 --- a/kde/src/lib/AccountList.cpp +++ b/kde/src/lib/AccountList.cpp @@ -259,7 +259,7 @@ QString AccountList::getOrderedList() const { QString order; for( int i = 0 ; i < size() ; i++) { - order += getAccountAt(i)->getAccountId() + "/"; + order += getAccountAt(i)->getAccountId() + '/'; } return order; } diff --git a/kde/src/lib/AudioCodecModel.cpp b/kde/src/lib/AudioCodecModel.cpp index f5b11ce73c9f8bcf9ef7bcdc6cd2d0f71bba25f8..c15254a98021d0d67883b540e93e38a4d72eece4 100644 --- a/kde/src/lib/AudioCodecModel.cpp +++ b/kde/src/lib/AudioCodecModel.cpp @@ -143,4 +143,4 @@ bool AudioCodecModel::moveDown(QModelIndex idx) return true; } return false; -} \ No newline at end of file +} diff --git a/kde/src/lib/AudioCodecModel.h b/kde/src/lib/AudioCodecModel.h index ec50ca268aa8de69e71eda26f7dfd2572a5c78f4..3321f6330bc37402cd087fe716319f66ee761985 100644 --- a/kde/src/lib/AudioCodecModel.h +++ b/kde/src/lib/AudioCodecModel.h @@ -65,4 +65,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/Call.cpp b/kde/src/lib/Call.cpp index db2b44fbbe9ba0ee95e338ca4afb5eba8b9bdd5a..e2734e8cd8a1dff8fc4284c5dc1d6fe33bc3d9e6 100644 --- a/kde/src/lib/Call.cpp +++ b/kde/src/lib/Call.cpp @@ -962,4 +962,4 @@ void Call::updatePlayback(int position,int size) void Call::contactBackendChanged() { m_ContactChanged = true; -} \ No newline at end of file +} diff --git a/kde/src/lib/CallModel.cpp b/kde/src/lib/CallModel.cpp index bc5dd6eb2c061ade0fb192aab7a524704ea3492c..70fd6b8c0735b82425d411ab811b114647dafa51 100644 --- a/kde/src/lib/CallModel.cpp +++ b/kde/src/lib/CallModel.cpp @@ -227,4 +227,4 @@ void CallModelBase::addPrivateCall(Call* call) { addCall(call,0); } -//More code in CallModel.hpp \ No newline at end of file +//More code in CallModel.hpp diff --git a/kde/src/lib/Contact.cpp b/kde/src/lib/Contact.cpp index 69603619de45fc69efd63feac8cdf2fa39c34044..7ec52e51071b7584fc7e1717d16bf9e022194c76 100644 --- a/kde/src/lib/Contact.cpp +++ b/kde/src/lib/Contact.cpp @@ -208,4 +208,4 @@ QHash<QString,QVariant> Contact::toHash() aContact[ "group" ] = getGroup(); aContact[ "department" ] = getDepartment(); return aContact; -} \ No newline at end of file +} diff --git a/kde/src/lib/ContactBackend.cpp b/kde/src/lib/ContactBackend.cpp index 1dbb4cda7124f343269460e8cda70f4fd6bcba55..ddfbdd9e9a6f942c7de063534df8e71de0b00268 100644 --- a/kde/src/lib/ContactBackend.cpp +++ b/kde/src/lib/ContactBackend.cpp @@ -56,10 +56,10 @@ ContactList ContactBackend::update() ///Return the extension/user of an URI (<sip:12345@exemple.com>) QString ContactBackend::getUserFromPhone(QString phoneNumber) { - if (phoneNumber.indexOf("@") != -1) { - QString user = phoneNumber.split("@")[0]; - if (user.indexOf(":") != -1) { - return user.split(":")[1]; + if (phoneNumber.indexOf('@') != -1) { + QString user = phoneNumber.split('@')[0]; + if (user.indexOf(':') != -1) { + return user.split(':')[1]; } else { return user; @@ -71,8 +71,8 @@ QString ContactBackend::getUserFromPhone(QString phoneNumber) ///Return the domaine of an URI (<sip:12345@exemple.com>) QString ContactBackend::getHostNameFromPhone(QString phoneNumber) { - if (phoneNumber.indexOf("@") != -1) { - return phoneNumber.split("@")[1].left(phoneNumber.split("@")[1].size()-1); + if (phoneNumber.indexOf('@') != -1) { + return phoneNumber.split('@')[1].left(phoneNumber.split('@')[1].size()-1); } return ""; -} \ No newline at end of file +} diff --git a/kde/src/lib/ContactBackend.h b/kde/src/lib/ContactBackend.h index 8899cae73a9dc687fda20237bdda98868fe847ca..d755a92df1dc769d8cce9fd0be1a8420b8543e53 100644 --- a/kde/src/lib/ContactBackend.h +++ b/kde/src/lib/ContactBackend.h @@ -76,4 +76,4 @@ signals: }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/CredentialModel.cpp b/kde/src/lib/CredentialModel.cpp index dd7329c4f49c957ac0663d5c840553ea7cd04ff2..05e2fecdf726337b220f6bfb0536819b7ee941a9 100644 --- a/kde/src/lib/CredentialModel.cpp +++ b/kde/src/lib/CredentialModel.cpp @@ -103,4 +103,4 @@ void CredentialModel::clear() delete data; } m_lCredentials.clear(); -} \ No newline at end of file +} diff --git a/kde/src/lib/CredentialModel.h b/kde/src/lib/CredentialModel.h index 0d6013a09c810ebd3886c0bceb7e469c971579fc..c94dd9a3bb007d5af5e8273b778add686fe1709d 100644 --- a/kde/src/lib/CredentialModel.h +++ b/kde/src/lib/CredentialModel.h @@ -61,4 +61,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/HistoryModel.cpp b/kde/src/lib/HistoryModel.cpp index 39f95a9393c8b034934ba0b272af842d31dc86a9..fbd09a13728d019542e87b51d2b41c2f89708c91 100644 --- a/kde/src/lib/HistoryModel.cpp +++ b/kde/src/lib/HistoryModel.cpp @@ -58,8 +58,8 @@ CallMap HistoryModel::m_sHistoryCalls ; HistoryModel::HistoryModel():m_HistoryInit(false) { ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); - QVector< QMap<QString, QString> > history = configurationManager.getHistory(); - foreach (MapStringString hc, history) { + const QVector< QMap<QString, QString> > history = configurationManager.getHistory(); + foreach (const MapStringString& hc, history) { Call* pastCall = Call::buildHistoryCall( hc[ CALLID_KEY ] , hc[ TIMESTAMP_START_KEY ].toUInt(), @@ -158,4 +158,4 @@ const QStringList HistoryModel::getNumbersByPopularity() } return cl; -} //getNumbersByPopularity \ No newline at end of file +} //getNumbersByPopularity diff --git a/kde/src/lib/HistoryModel.h b/kde/src/lib/HistoryModel.h index bbc850393080f4bafcfef4e3904312a4c38b5769..d3b638fed43e75c7b4b4f4ecfc0fc47b6c50e2fe 100644 --- a/kde/src/lib/HistoryModel.h +++ b/kde/src/lib/HistoryModel.h @@ -77,4 +77,4 @@ signals: void newHistoryCall ( Call* call ); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/InstantMessagingModel.cpp b/kde/src/lib/InstantMessagingModel.cpp index 8417e07f16b4880bf3024d05683d213b356394eb..5c7c8c697df724c5288c377d5efc4893662d8615 100644 --- a/kde/src/lib/InstantMessagingModel.cpp +++ b/kde/src/lib/InstantMessagingModel.cpp @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***********************************************************************************/ #include "InstantMessagingModel.h" + #include "CallModel.h" #include "callmanager_interface_singleton.h" #include "Call.h" @@ -123,4 +124,4 @@ void InstantMessagingModel::addOutgoingMessage(QString message) im.message = message; m_lMessages << im; emit dataChanged(index(m_lMessages.size() -1,0), index(m_lMessages.size()-1,0)); -} \ No newline at end of file +} diff --git a/kde/src/lib/InstantMessagingModel.h b/kde/src/lib/InstantMessagingModel.h index c4123e448b7bf741e10c1971a6aca0eb8a1b1c9f..81a1e38a04d01e8aed3afe2339553e486c3106d1 100644 --- a/kde/src/lib/InstantMessagingModel.h +++ b/kde/src/lib/InstantMessagingModel.h @@ -52,7 +52,7 @@ public: } InstantMessagingModel* getModel(Call* call); private: - InstantMessagingModelManager(); + explicit InstantMessagingModelManager(); static InstantMessagingModelManager* m_spInstance; static CallModelBase* m_spCallModel; QHash<QString,InstantMessagingModel*> m_lModels; @@ -75,7 +75,7 @@ public: static const int MESSAGE_IMAGE_ROLE = 103; static const int MESSAGE_CONTACT_ROLE = 104; - InstantMessagingModel(Call* call, QObject* parent = nullptr); + explicit InstantMessagingModel(Call* call, QObject* parent = nullptr); QVariant data ( const QModelIndex& index, int role = Qt::DisplayRole ) const; int rowCount ( const QModelIndex& parent = QModelIndex() ) const; Qt::ItemFlags flags ( const QModelIndex& index ) const; @@ -95,4 +95,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/VideoCodecModel.cpp b/kde/src/lib/VideoCodecModel.cpp index b8f32f9f6d49a4876136532a700c79ffa31b4047..8196ce25a2767ed58b53547124e9cb820c5eb82f 100644 --- a/kde/src/lib/VideoCodecModel.cpp +++ b/kde/src/lib/VideoCodecModel.cpp @@ -76,8 +76,8 @@ void VideoCodecModel::reload() { m_lCodecs.clear(); VideoInterface& interface = VideoInterfaceSingleton::getInstance(); - VectorMapStringString codecs = interface.getCodecs(m_pAccount->getAccountId()); - foreach(MapStringString h,codecs) { + const VectorMapStringString codecs = interface.getCodecs(m_pAccount->getAccountId()); + foreach(const MapStringString& h,codecs) { VideoCodec* c = new VideoCodec(h["name"],h["bitrate"].toInt(),h["enabled"]=="true"); m_lCodecs << c; } @@ -164,4 +164,4 @@ void VideoCodec::setBitrate(const uint bitrate) void VideoCodec::setEnabled(const bool enabled) { m_Enabled = enabled; -} \ No newline at end of file +} diff --git a/kde/src/lib/VideoCodecModel.h b/kde/src/lib/VideoCodecModel.h index 6a5c59f09ef8851fadd5e1aeaa87c981f84c167e..d87f4638a76fd88556f3147d80ae31bf5482102a 100644 --- a/kde/src/lib/VideoCodecModel.h +++ b/kde/src/lib/VideoCodecModel.h @@ -88,4 +88,4 @@ class LIB_EXPORT VideoCodec { bool m_Enabled; static bool m_sInit; }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/VideoDevice.cpp b/kde/src/lib/VideoDevice.cpp index 68dd69244832829c3530e27b237a222bb8419f50..e43c56b3ccb218502fcfb5de5aa9bdf9b4998bb0 100644 --- a/kde/src/lib/VideoDevice.cpp +++ b/kde/src/lib/VideoDevice.cpp @@ -28,12 +28,12 @@ VideoDevice::VideoDevice(QString id) : m_DeviceId(id) } ///Get the video device list -QList<VideoDevice*> VideoDevice::getDeviceList() +const QList<VideoDevice*> VideoDevice::getDeviceList() { QHash<QString,VideoDevice*> devices; VideoInterface& interface = VideoInterfaceSingleton::getInstance(); - QStringList deviceList = interface.getDeviceList(); - foreach(QString device,deviceList) { + const QStringList deviceList = interface.getDeviceList(); + foreach(const QString& device,deviceList) { if (!m_slDevices[device]) devices[device] = new VideoDevice(device); else @@ -55,14 +55,14 @@ VideoDevice* VideoDevice::getDevice(QString name) } ///Get the valid rates for this device -QStringList VideoDevice::getRateList(VideoChannel channel, Resolution resolution) +const QStringList VideoDevice::getRateList(VideoChannel channel, Resolution resolution) { VideoInterface& interface = VideoInterfaceSingleton::getInstance(); return interface.getDeviceRateList(m_DeviceId,channel,resolution.toString()); } ///Get the valid channel list -QList<VideoChannel> VideoDevice::getChannelList() +const QList<VideoChannel> VideoDevice::getChannelList() { VideoInterface& interface = VideoInterfaceSingleton::getInstance(); return interface.getDeviceChannelList(m_DeviceId); @@ -90,39 +90,40 @@ void VideoDevice::setChannel(VideoChannel channel) //??? No device } ///Get the current resolution -Resolution VideoDevice::getResolution() +const Resolution VideoDevice::getResolution() { VideoInterface& interface = VideoInterfaceSingleton::getInstance(); return Resolution(interface.getActiveDeviceSize()); } ///Get the current channel -VideoChannel VideoDevice::getChannel() //??? No device +const VideoChannel VideoDevice::getChannel() //??? No device { VideoInterface& interface = VideoInterfaceSingleton::getInstance(); return interface.getActiveDeviceChannel(); } ///Get the current rate -VideoRate VideoDevice::getRate() +const VideoRate VideoDevice::getRate() { VideoInterface& interface = VideoInterfaceSingleton::getInstance(); return interface.getActiveDeviceRate(); } ///Get a list of valid resolution -QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel) +const QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel) { QList<Resolution> toReturn; VideoInterface& interface = VideoInterfaceSingleton::getInstance(); - QStringList list = interface.getDeviceSizeList(m_DeviceId,channel); - foreach(QString res,list) { + const QStringList list = interface.getDeviceSizeList(m_DeviceId,channel); + foreach(const QString& res,list) { toReturn << Resolution(res); } return toReturn; } -QString VideoDevice::getDeviceId() +///Get the device id +const QString VideoDevice::getDeviceId() const { return m_DeviceId; -} \ No newline at end of file +} diff --git a/kde/src/lib/VideoDevice.h b/kde/src/lib/VideoDevice.h index e34573137151060aeccb281e77f1dd8359959139..6fcebe1e4b6e1bdac62e5442a5bb460c34114b55 100644 --- a/kde/src/lib/VideoDevice.h +++ b/kde/src/lib/VideoDevice.h @@ -42,7 +42,7 @@ struct LIB_EXPORT Resolution { Resolution(const Resolution& res):width(res.width),height(res.height){} Resolution(const QSize& size):width(size.width()),height(size.height()){} //Getter - QString toString() { return QString::number(width)+"x"+QString::number(height);} + const QString toString() const { return QString::number(width)+"x"+QString::number(height);} //Attributes uint width; @@ -61,16 +61,16 @@ class LIB_EXPORT VideoDevice { static VideoDevice* getDevice(QString id); //Getter - QStringList getRateList(VideoChannel channel, Resolution resolution); - QList<Resolution> getResolutionList(VideoChannel channel); - QList<VideoChannel> getChannelList (); - Resolution getResolution (); - VideoChannel getChannel (); - VideoRate getRate (); - QString getDeviceId (); + const QStringList getRateList(VideoChannel channel, Resolution resolution); + const QList<Resolution> getResolutionList(VideoChannel channel); + const QList<VideoChannel> getChannelList (); + const Resolution getResolution (); + const VideoChannel getChannel (); + const VideoRate getRate (); + const QString getDeviceId () const; //Static getter - static QList<VideoDevice*> getDeviceList(); + static const QList<VideoDevice*> getDeviceList(); //Setter void setRate ( VideoRate rate ); @@ -85,4 +85,4 @@ class LIB_EXPORT VideoDevice { static QHash<QString,VideoDevice*> m_slDevices; static bool m_sInit; }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/VideoModel.cpp b/kde/src/lib/VideoModel.cpp index b792881a8370baf2a08b9125dad7cd233c62a17c..4330249027865dc9b0cf5bc581e41997a031f12a 100644 --- a/kde/src/lib/VideoModel.cpp +++ b/kde/src/lib/VideoModel.cpp @@ -164,4 +164,4 @@ void VideoModel::stoppedDecoding(QString id, QString shmPath) emit videoStopped(); // if (m_pTimer) // m_pTimer->stop(); -} \ No newline at end of file +} diff --git a/kde/src/lib/VideoModel.h b/kde/src/lib/VideoModel.h index 511efaf43a07435c7a30e00777a0ba4c26ca671f..8eb56520100db000b7e6bc0d187d0dc293c83301 100644 --- a/kde/src/lib/VideoModel.h +++ b/kde/src/lib/VideoModel.h @@ -81,4 +81,4 @@ signals: void videoCallInitiated(VideoRenderer*); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/VideoRenderer.cpp b/kde/src/lib/VideoRenderer.cpp index 9071ae4d0ae527b99d78e99a9b619f0ad102c4f3..0a502e43db94a52d8acfef8ce17f9501b1279844 100644 --- a/kde/src/lib/VideoRenderer.cpp +++ b/kde/src/lib/VideoRenderer.cpp @@ -308,4 +308,4 @@ void VideoRenderer::setResolution(QSize size) void VideoRenderer::setShmPath(QString path) { m_ShmPath = path; -} \ No newline at end of file +} diff --git a/kde/src/lib/VideoRenderer.h b/kde/src/lib/VideoRenderer.h index bfbfa45ef10762d82ebe80d06645638c39fc756a..5c647d38d16455b577d5f01540e8e7d6594e3e1f 100644 --- a/kde/src/lib/VideoRenderer.h +++ b/kde/src/lib/VideoRenderer.h @@ -90,4 +90,4 @@ class LIB_EXPORT VideoRenderer : public QObject { }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/configurationmanager_interface_singleton.cpp b/kde/src/lib/configurationmanager_interface_singleton.cpp index e177272326a9aa10b931514c3eebddb597524ed2..37628d74490dab5260f504a9506831ea548f3580 100644 --- a/kde/src/lib/configurationmanager_interface_singleton.cpp +++ b/kde/src/lib/configurationmanager_interface_singleton.cpp @@ -34,4 +34,3 @@ ConfigurationManagerInterface & ConfigurationManagerInterfaceSingleton::getInsta } return *interface; } - diff --git a/kde/src/lib/dbus/metatypes.h b/kde/src/lib/dbus/metatypes.h index e86ef685c20adee93d7f4baf5b15df9d2623b7c4..a059e542d18cb64cbe7a37ef80d77e0e1fd7a6ff 100644 --- a/kde/src/lib/dbus/metatypes.h +++ b/kde/src/lib/dbus/metatypes.h @@ -26,4 +26,4 @@ inline void registerCommTypes() { dbus_metaTypeInit = true; } -#endif \ No newline at end of file +#endif diff --git a/kde/src/lib/sflphone_const.h b/kde/src/lib/sflphone_const.h index 3b4fa6c113a6dc66db717e3a30038323b122f5e1..f7b69856a50b811596222bfe7b93fc5d15d20a37 100644 --- a/kde/src/lib/sflphone_const.h +++ b/kde/src/lib/sflphone_const.h @@ -312,4 +312,4 @@ static const QString empty(""); #define TIMESTAMP_STOP_KEY "timestamp_stop" #define MISSED_STRING "missed" #define INCOMING_STRING "incoming" -#define OUTGOING_STRING "outgoing" \ No newline at end of file +#define OUTGOING_STRING "outgoing" diff --git a/kde/src/lib/typedefs.h b/kde/src/lib/typedefs.h index d8bf6c89fb39cae34cd89bf4e14d2328e7d2d6af..e2241ae84719d27ba8784fc84dda3b1a088a772b 100644 --- a/kde/src/lib/typedefs.h +++ b/kde/src/lib/typedefs.h @@ -52,4 +52,4 @@ typedef QMap<QString, int> MapStringInt; #endif -#endif \ No newline at end of file +#endif diff --git a/kde/src/main.cpp b/kde/src/main.cpp index b3438f5abe6882fb482e56129e01849fcc347bff..9b8823c4cd4d911a98e9fed28c32399e6202c78a 100755 --- a/kde/src/main.cpp +++ b/kde/src/main.cpp @@ -40,7 +40,6 @@ #include "klib/ConfigurationSkeleton.h" #include "CallView.h" #include "SFLPhone.h" -#include "lib/instance_interface_singleton.h" //SFLPhone library #include "lib/instance_interface_singleton.h" diff --git a/kde/src/test/account_test.cpp b/kde/src/test/account_test.cpp index b85c87ae6f549b6a90d9688e8a149c4a2ec02e6a..605ee8dd44301c14856bd9ad370bdee34e946660 100644 --- a/kde/src/test/account_test.cpp +++ b/kde/src/test/account_test.cpp @@ -1,6 +1,6 @@ -#include <QString> -#include <QtTest> -#include <QtCore> +#include <QtCore/QString> +#include <QtTest/QtTest> +//#include <QtCore> #include "../src/lib/configurationmanager_interface_singleton.h" #include "../src/lib/callmanager_interface_singleton.h" @@ -632,4 +632,4 @@ void AccountTests::cleanupTestCase() { //END cleanup QTEST_MAIN(AccountTests) -#include "account_test.moc" \ No newline at end of file +#include "account_test.moc" diff --git a/kde/src/test/call_test.cpp b/kde/src/test/call_test.cpp index 164eca30233222551794c919951467300d7d39b9..d8ea50106aa5d60212f45e257ce92f82f1fee0b7 100644 --- a/kde/src/test/call_test.cpp +++ b/kde/src/test/call_test.cpp @@ -1,4 +1,4 @@ -#include <QString> +#include <QtCore/QString> #include <QtTest> #include <QtCore> diff --git a/kde/src/test/dbus_test.cpp b/kde/src/test/dbus_test.cpp index c4d081452d8b1223756b6a0a93e97c1c168cf0cd..7bf05197e6b1135e6c0b75d9ec24c5df12678754 100644 --- a/kde/src/test/dbus_test.cpp +++ b/kde/src/test/dbus_test.cpp @@ -1,4 +1,4 @@ -#include <QString> +#include <QtCore/QString> #include <QtTest> #include <QtCore> @@ -38,4 +38,4 @@ void DBusTests::testInstanceManagerConnection() } QTEST_MAIN(DBusTests) -#include "dbus_test.moc" \ No newline at end of file +#include "dbus_test.moc" diff --git a/kde/src/widgets/AcceleratedVideoWidget.cpp b/kde/src/widgets/AcceleratedVideoWidget.cpp index 3c3dd2dc883bbd53290d8770dba250b69fb690af..fdbd639e4527404ae5ebd4a379e5c37081450710 100644 --- a/kde/src/widgets/AcceleratedVideoWidget.cpp +++ b/kde/src/widgets/AcceleratedVideoWidget.cpp @@ -526,4 +526,4 @@ void AcceleratedVideoWidget::drawPbuffer() cube->setAnimationPaused(enable); for (int i = 0; i < 3; ++i) cubes[i]->setAnimationPaused(enable); - } \ No newline at end of file + } diff --git a/kde/src/widgets/AcceleratedVideoWidget.h b/kde/src/widgets/AcceleratedVideoWidget.h index 1d80f1030c7a7f340e4452a0cb1d6d4caad8f73f..86b4e686e20c65fa945109e6d3e93841121e3c9b 100644 --- a/kde/src/widgets/AcceleratedVideoWidget.h +++ b/kde/src/widgets/AcceleratedVideoWidget.h @@ -81,7 +81,7 @@ class TileBuilder { public: enum { bl, br, tr, tl }; - TileBuilder(Geometry *, qreal depth = 0.0f, qreal size = 1.0f); + explicit TileBuilder(Geometry *, qreal depth = 0.0f, qreal size = 1.0f); Tile *newTile(const QVector3D &loc = QVector3D()) const; void setColor(QColor c) { color = c; } protected: @@ -101,7 +101,7 @@ class Cube : public QObject, public Tile Q_PROPERTY(qreal altitude READ altitude WRITE setAltitude) Q_PROPERTY(qreal rotation READ rotation WRITE setRotation) public: - Cube(const QVector3D &loc = QVector3D()); + explicit Cube(const QVector3D &loc = QVector3D()); ~Cube(); qreal range() { return location.x(); } void setRange(qreal r); @@ -126,7 +126,7 @@ private: class CubeBuilder : public TileBuilder { public: - CubeBuilder(Geometry *, qreal depth = 0.0f, qreal size = 1.0f); + explicit CubeBuilder(Geometry *, qreal depth = 0.0f, qreal size = 1.0f); Cube *newCube(const QVector3D &loc = QVector3D()) const; private: mutable int ix; @@ -142,7 +142,7 @@ class AcceleratedVideoWidget : public QGLWidget { Q_OBJECT public: - AcceleratedVideoWidget(QWidget* parent); + explicit AcceleratedVideoWidget(QWidget* parent); ~AcceleratedVideoWidget(); private: @@ -178,4 +178,4 @@ protected: private slots: void newFrameEvent(); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/widgets/BookmarkDock.cpp b/kde/src/widgets/BookmarkDock.cpp index 5db807b6424c0e54c61b8e876e5dbac8533cfe40..10b25f975efdf1c4062b8afbd456416963ca7674 100644 --- a/kde/src/widgets/BookmarkDock.cpp +++ b/kde/src/widgets/BookmarkDock.cpp @@ -129,8 +129,8 @@ void BookmarkDock::addBookmark_internal(const QString& phone) HistoryTreeItem* widget = new HistoryTreeItem(m_pItemView,phone,true); QTreeWidgetItem* item = NULL; - if (widget->getName() == i18n("Unknown") || widget->getName().isEmpty()) { - item = m_pItemView->addItem<QNumericTreeWidgetItem>(i18n("Unknown")); + if (widget->getName() == i18nc("Unknown peer","Unknown") || widget->getName().isEmpty()) { + item = m_pItemView->addItem<QNumericTreeWidgetItem>(i18nc("Unknown peer","Unknown")); } else { item = m_pItemView->addItem<QNumericTreeWidgetItem>(QString(widget->getName()[0])); @@ -198,8 +198,8 @@ void BookmarkDock::reload() m_pBookmark << widget; } } - foreach (QString nb, ConfigurationSkeleton::bookmarkList()) { + foreach (const QString& nb, ConfigurationSkeleton::bookmarkList()) { addBookmark_internal(nb); } ConfigurationSkeleton::setDisplayContactCallHistory(m_pMostUsedCK->isChecked()); -} //reload \ No newline at end of file +} //reload diff --git a/kde/src/widgets/BookmarkDock.h b/kde/src/widgets/BookmarkDock.h index efe3686fcda37951a3542532c83f803775f1b072..2d6f89187ff73409a89b81a12e4734c348850ba1 100644 --- a/kde/src/widgets/BookmarkDock.h +++ b/kde/src/widgets/BookmarkDock.h @@ -65,4 +65,4 @@ private slots: void reload(); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/widgets/CallTreeItem.cpp b/kde/src/widgets/CallTreeItem.cpp index 1b08f7e755d101c0b856256d0533da9e3ae1fb49..7eb94faafd06c94a5bbdcf5cd3a4301287bcb308 100644 --- a/kde/src/widgets/CallTreeItem.cpp +++ b/kde/src/widgets/CallTreeItem.cpp @@ -1,4 +1,5 @@ /*************************************************************************** + * Copyright (C) 2009-2012 by Savoir-Faire Linux * * Author : Mathieu Leduc-Hamel mathieu.leduc-hamel@savoirfairelinux.com * * Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>* * * @@ -41,6 +42,7 @@ #include <QtGui/QFontMetrics> #include <QtGui/QPalette> #include <QtGui/QBitmap> +#include <QtGui/QGraphicsOpacityEffect> //KDE #include <KLocale> @@ -373,7 +375,7 @@ void CallTreeItem::updated() } if (m_pIconL && m_pItemCall->isConference()) { - m_pIconL->setPixmap(QPixmap(ICON_CONFERENCE).scaled(QSize(24,24))); + m_pIconL->setPixmap(QPixmap(KStandardDirs::locate("data","sflphone-client-kde/conf-small.png"))); } bool transfer = state == CALL_STATE_TRANSFER || state == CALL_STATE_TRANSF_HOLD; @@ -410,6 +412,16 @@ void CallTreeItem::updated() } changed(); + //Set fading effect + if (state == CALL_STATE_HOLD && m_pItemCall && !m_pItemCall->isConference()) { + QGraphicsOpacityEffect* opacityEffect = new QGraphicsOpacityEffect; + setGraphicsEffect(opacityEffect); + } + else { + setGraphicsEffect(nullptr); + } + + //Start/Stop the elapsed time label if ((state == CALL_STATE_CURRENT || state == CALL_STATE_HOLD || state == CALL_STATE_TRANSFER) && !m_pTimer) { m_pTimer = new QTimer(this); m_pTimer->setInterval(1000); @@ -552,7 +564,7 @@ void CallTreeItem::incrementTimer() { int nsec = QDateTime::fromTime_t(m_pItemCall->getStartTimeStamp().toInt()).time().secsTo( QTime::currentTime() ); if (nsec/3600) - m_pElapsedL->setText(QString("%1").arg(nsec/3600).trimmed()+":"+QString("%1").arg((nsec%3600)/60,2,10,QChar('0')).trimmed()+":"+QString("%1").arg((nsec%3600)%60,2,10,QChar('0')).trimmed()+" "); + m_pElapsedL->setText(QString("%1").arg(nsec/3600).trimmed()+':'+QString("%1").arg((nsec%3600)/60,2,10,QChar('0')).trimmed()+':'+QString("%1").arg((nsec%3600)%60,2,10,QChar('0')).trimmed()+' '); else - m_pElapsedL->setText(QString("%1").arg((nsec)/60).trimmed()+":"+QString("%1").arg((nsec)%60,2,10,QChar('0')).trimmed()+" "); + m_pElapsedL->setText(QString("%1").arg((nsec)/60).trimmed()+':'+QString("%1").arg((nsec)%60,2,10,QChar('0')).trimmed()+' '); } diff --git a/kde/src/widgets/CategorizedTreeWidget.cpp b/kde/src/widgets/CategorizedTreeWidget.cpp index e32c6c9a3ed35d6315abf0ca8600264418f10d18..5f975c5626543df6dd91da17d1b96eeaa05c6064 100644 --- a/kde/src/widgets/CategorizedTreeWidget.cpp +++ b/kde/src/widgets/CategorizedTreeWidget.cpp @@ -198,4 +198,4 @@ void CategorizedTreeWidget::removeItem(QTreeWidgetItem* item) } } } -} \ No newline at end of file +} diff --git a/kde/src/widgets/CategorizedTreeWidget.h b/kde/src/widgets/CategorizedTreeWidget.h index d273353ff757490204351728a1b7cb6ebee12a3a..fdc36d15bdbf2d0968c479f58300baa03ddf2e04 100644 --- a/kde/src/widgets/CategorizedTreeWidget.h +++ b/kde/src/widgets/CategorizedTreeWidget.h @@ -89,4 +89,4 @@ template <class T> T* CategorizedTreeWidget::addCategory(QString name) return categoryItem; } -#endif \ No newline at end of file +#endif diff --git a/kde/src/widgets/ConferenceBox.cpp b/kde/src/widgets/ConferenceBox.cpp index 7784fbade9ed3c5fdda849517a049b0e57759feb..f48d328c1edfe96b443ad35a7d6e1cc32f9acd8d 100644 --- a/kde/src/widgets/ConferenceBox.cpp +++ b/kde/src/widgets/ConferenceBox.cpp @@ -62,10 +62,10 @@ void ConferenceBox::drawCategory(const QModelIndex &index, QColor window(option.palette.window().color()); const QColor base(option.palette.base().color()); - window.setAlphaF(0.7); + window.setAlphaF(option.state & QStyle::State_Selected?0.9:0.7); QColor window2(window); - window2.setAlphaF(0.2); + window2.setAlphaF(option.state & QStyle::State_Selected?0.4:0.2); QLinearGradient decoGradient1; if (leftToRight) { @@ -339,3 +339,4 @@ int ConferenceBox::categoryHeight(const QModelIndex &index, const QStyleOption & return fontMetrics.height() + 2 + 12 /* vertical spacing */; } + diff --git a/kde/src/widgets/ContactDock.cpp b/kde/src/widgets/ContactDock.cpp index a451bc37565ce46f782afecd4f88243a42ad65ae..012adcde6586ba33b0490c54e1ffec2e31ab3206 100644 --- a/kde/src/widgets/ContactDock.cpp +++ b/kde/src/widgets/ContactDock.cpp @@ -127,7 +127,7 @@ ContactDock::ContactDock(QWidget* parent) : QDockWidget(parent) QStringList sortType; - sortType << i18n("Name") << i18n("Organisation") << i18n("Recently used") << i18n("Group") << i18n("Department"); + sortType << i18nc("Sort by name","Name") << i18nc("Sort by Organisation","Organisation") << i18nc("Sort by Recently used","Recently used") << i18nc("Sort by Group","Group") << i18nc("Sort by Department","Department"); m_pSortByCBB->addItems(sortType); @@ -213,7 +213,7 @@ void ContactDock::reloadContact() switch (CURRENT_SORTING_MODE) { case Recently_used: recentlyUsed = getContactListByTime(); - foreach (QString cat, m_slHistoryConst) { + foreach (const QString& cat, m_slHistoryConst) { m_pContactView->addCategory(cat); } break; @@ -228,7 +228,7 @@ void ContactDock::reloadContact() category = HelperFunctions::normStrippped(QString(cont->getFormattedName().trimmed()[0])).toUpper(); break; case Organisation: - category = (cont->getOrganization().isEmpty())?i18n("Unknown"):cont->getOrganization(); + category = (cont->getOrganization().isEmpty())?i18nc("Unknown category","Unknown"):cont->getOrganization(); break; case Recently_used: if (recentlyUsed.find(cont) != recentlyUsed.end()) @@ -240,7 +240,7 @@ void ContactDock::reloadContact() category = i18n("TODO"); break; case Department: - category = (cont->getDepartment().isEmpty())?i18n("Unknown"):cont->getDepartment();; + category = (cont->getDepartment().isEmpty())?i18nc("Unknown category","Unknown"):cont->getDepartment();; break; } QNumericTreeWidgetItem_hist* item = m_pContactView->addItem<QNumericTreeWidgetItem_hist>(category); diff --git a/kde/src/widgets/ContactItemWidget.cpp b/kde/src/widgets/ContactItemWidget.cpp index 912e83d8bb292f9d9d96cf735f726aa13bb1dbc7..8029e970355cd30d25f468944b7e85c4fc1e2524 100644 --- a/kde/src/widgets/ContactItemWidget.cpp +++ b/kde/src/widgets/ContactItemWidget.cpp @@ -1,4 +1,5 @@ /*************************************************************************** + * Copyright (C) 2009-2012 by Savoir-Faire Linux * * Author : Mathieu Leduc-Hamel mathieu.leduc-hamel@savoirfairelinux.com * * Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>* * * @@ -323,8 +324,8 @@ QString ContactItemWidget::showNumberSelector(bool& ok) QStringList list; QHash<QString,QString> map; foreach (Contact::PhoneNumber* number, m_pContactKA->getPhoneNumbers()) { - map[number->getType()+" ("+number->getNumber()+")"] = number->getNumber(); - list << number->getType()+" ("+number->getNumber()+")"; + map[number->getType()+" ("+number->getNumber()+')'] = number->getNumber(); + list << number->getType()+" ("+number->getNumber()+')'; } QString result = QInputDialog::getItem (this, i18n("Select phone number"), i18n("This contact have many phone number, please select the one you wish to call"), list, 0, false, &ok); @@ -534,4 +535,4 @@ void ContactItemWidget::mouseDoubleClickEvent(QMouseEvent *e ) else { e->ignore(); } -} \ No newline at end of file +} diff --git a/kde/src/widgets/Dialpad.cpp b/kde/src/widgets/Dialpad.cpp index b7d3cfdf00e614917d87197119b7ab5805c8104e..f3b99f7bbbb8e51d6ce1c1585e8936f9ef629a57 100755 --- a/kde/src/widgets/Dialpad.cpp +++ b/kde/src/widgets/Dialpad.cpp @@ -70,4 +70,4 @@ Dialpad::~Dialpad() void Dialpad::clicked(QString& text) { emit typed(text); -} \ No newline at end of file +} diff --git a/kde/src/widgets/Dialpad.h b/kde/src/widgets/Dialpad.h index 67d89516e56198d7012ed6eda8295a08a70b3233..159af018ecbab7a7e649db560507064704e0074e 100755 --- a/kde/src/widgets/Dialpad.h +++ b/kde/src/widgets/Dialpad.h @@ -75,4 +75,4 @@ signals: void typed(QString text); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/widgets/HistoryDock.cpp b/kde/src/widgets/HistoryDock.cpp index f5244fb86c65faeca91e1caafac804327bb2d94f..01ac6b0c5628950567730f42fc04e620c112c2ec 100644 --- a/kde/src/widgets/HistoryDock.cpp +++ b/kde/src/widgets/HistoryDock.cpp @@ -95,7 +95,7 @@ HistoryDock::HistoryDock(QWidget* parent) : QDockWidget(parent) m_pSortByCBB = new QComboBox ( ); m_pSortByL = new QLabel ( i18n("Sort by:") ); m_pFromL = new QLabel ( i18n("From:") ); - m_pToL = new QLabel ( i18n("To:") ); + m_pToL = new QLabel ( i18nc("To date:","To:")); m_pFromDW = new KDateWidget ( ); m_pToDW = new KDateWidget ( ); m_pAllTimeCB = new QCheckBox ( i18n("Display all")); @@ -123,7 +123,7 @@ HistoryDock::HistoryDock(QWidget* parent) : QDockWidget(parent) m_pFilterLE->setClearButtonShown(true); QStringList sortBy; - sortBy << i18n("Date") << i18n("Name") << i18n("Popularity") << i18n("Length"); + sortBy << i18nc("Sort by date","Date") << i18nc("Sort by Name","Name") << i18nc("Sort by Popularity","Popularity") << i18nc("Sort by Length","Length"); m_pSortByCBB->addItems(sortBy); QWidget* mainWidget = new QWidget(this); @@ -213,7 +213,7 @@ void HistoryDock::reload() QHash<Contact*, QDateTime> recentlyUsed; switch (CURRENT_SORTING_MODE) { case Date: - foreach (QString cat, m_slHistoryConst) { + foreach (const QString& cat, m_slHistoryConst) { m_pItemView->addCategory(i18n(cat.toAscii())); } break; @@ -244,7 +244,7 @@ void HistoryDock::reload() while (iter.hasNext()) { iter.next(); QNumericTreeWidgetItem* item = iter.value(); - item->setText(0,iter.key()+" ("+QString::number(item->weight)+")"); + item->setText(0,iter.key()+" ("+QString::number(item->weight)+')'); } break; } @@ -437,4 +437,4 @@ void HistoryDock::keyPressEvent(QKeyEvent* event) { m_pFilterLE->setText(m_pFilterLE->text().left( m_pFilterLE->text().size()-1 )); else if (!event->text().isEmpty() && !(key == Qt::Key_Backspace)) m_pFilterLE->setText(m_pFilterLE->text()+event->text()); -} //keyPressEvent \ No newline at end of file +} //keyPressEvent diff --git a/kde/src/widgets/HistoryDock.h b/kde/src/widgets/HistoryDock.h index c0aade1564f06798223ffa678e275dad64ec74d9..dee17409190ae0fc290eaf6fbd6d5ba5ce33bd06 100644 --- a/kde/src/widgets/HistoryDock.h +++ b/kde/src/widgets/HistoryDock.h @@ -122,4 +122,4 @@ private: HistoryDock* m_pDock; }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/widgets/HistoryTreeItem.cpp b/kde/src/widgets/HistoryTreeItem.cpp index c20e9fc6b2df58855100c02cc867429c4b706f1f..9d5d8325e9024204be879a091c6d45aba95898d2 100644 --- a/kde/src/widgets/HistoryTreeItem.cpp +++ b/kde/src/widgets/HistoryTreeItem.cpp @@ -1,4 +1,5 @@ /*************************************************************************** + * Copyright (C) 2009-2012 by Savoir-Faire Linux * * Author : Mathieu Leduc-Hamel mathieu.leduc-hamel@savoirfairelinux.com * * Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>* * * @@ -452,8 +453,8 @@ void HistoryTreeItem::editNote() void HistoryTreeItem::updateSlider(int pos, int size) { - m_pTimeLeftL->setText(QString("%1").arg((size/1000-pos/1000)/60,2,10,QChar('0'))+":"+QString("%1").arg((size/1000-pos/1000)%60,2,10,QChar('0'))); - m_pTimePlayedL->setText(QString("%1").arg((pos/1000)/60,2,10,QChar('0'))+":"+QString("%1").arg((pos/1000)%60,2,10,QChar('0'))); + m_pTimeLeftL->setText(QString("%1").arg((size/1000-pos/1000)/60,2,10,QChar('0'))+':'+QString("%1").arg((size/1000-pos/1000)%60,2,10,QChar('0'))); + m_pTimePlayedL->setText(QString("%1").arg((pos/1000)/60,2,10,QChar('0'))+':'+QString("%1").arg((pos/1000)%60,2,10,QChar('0'))); m_pAudioSlider->setMaximum(size); m_pAudioSlider->setValue(pos); } @@ -506,9 +507,9 @@ void HistoryTreeItem::setCall(Call *call) int dur = m_pItemCall->getStopTimeStamp().toInt() - m_pItemCall->getStartTimeStamp().toInt(); if (dur/3600) - m_pLengthL->setText(QString("%1").arg(dur/3600).trimmed()+":"+QString("%1").arg((dur%3600)/60,2,10,QChar('0')).trimmed()+":"+QString("%1").arg((dur%3600)%60,2,10,QChar('0')).trimmed()+" "); + m_pLengthL->setText(QString("%1").arg(dur/3600).trimmed()+':'+QString("%1").arg((dur%3600)/60,2,10,QChar('0')).trimmed()+':'+QString("%1").arg((dur%3600)%60,2,10,QChar('0')).trimmed()+' '); else - m_pLengthL->setText(QString("%1").arg((dur%3600)/60).trimmed()+":"+QString("%1").arg((dur%3600)%60,2,10,QChar('0')).trimmed()+" "); + m_pLengthL->setText(QString("%1").arg((dur%3600)/60).trimmed()+':'+QString("%1").arg((dur%3600)%60,2,10,QChar('0')).trimmed()+' '); connect(m_pItemCall , SIGNAL(changed()) , this , SLOT(updated() )); updated(); @@ -574,7 +575,7 @@ bool HistoryTreeItem::getContactInfo(QString phoneNumber) if (!phoneNumber.isEmpty() && m_Name.isEmpty()) m_Name = phoneNumber; else if (m_Name.isEmpty()) - m_Name = i18n("Unknown"); + m_Name = i18nc("Unknown peer","Unknown"); m_pPeerNameL->setText("<b>"+m_Name+"</b>"); } @@ -617,7 +618,7 @@ QString HistoryTreeItem::getName() else if (!m_Name.isEmpty()){ return m_Name; } - return i18n("Unknown"); + return i18nc("Unknown peer","Unknown"); } ///Return the caller peer number @@ -700,4 +701,4 @@ void HistoryTreeItem::dropEvent(QDropEvent *e) kDebug() << "Invalid drop data"; e->ignore(); } -} \ No newline at end of file +} diff --git a/kde/src/widgets/HistoryTreeItem.h b/kde/src/widgets/HistoryTreeItem.h index 462cab9eee78a3b26ecdb68d424ee5b3ccd90e34..0ce8c94176fdad53642289d996f21ba9920e58b8 100644 --- a/kde/src/widgets/HistoryTreeItem.h +++ b/kde/src/widgets/HistoryTreeItem.h @@ -55,7 +55,7 @@ class HistoryTreeItem : public QWidget Q_OBJECT public: //Constructor - HistoryTreeItem(QWidget* parent =0, QString phone = "",bool isBookmark=false); + explicit HistoryTreeItem(QWidget* parent =0, QString phone = "",bool isBookmark=false); ~HistoryTreeItem(); //Getters diff --git a/kde/src/widgets/IMManager.cpp b/kde/src/widgets/IMManager.cpp index 3692880b2372ccd0654dabb62ea04a6966491de8..ccdd1862e47a60edf7e9707c6ff95f490b14f85c 100644 --- a/kde/src/widgets/IMManager.cpp +++ b/kde/src/widgets/IMManager.cpp @@ -51,4 +51,4 @@ void IMManager::closeRequest(int index) if (!count()) setVisible(false); } -} \ No newline at end of file +} diff --git a/kde/src/widgets/IMManager.h b/kde/src/widgets/IMManager.h index 08c13f81e503851c913e2422c1ba826c1c743504..28bfdce456131477cfd16050ff69f2aa0b66b72d 100644 --- a/kde/src/widgets/IMManager.h +++ b/kde/src/widgets/IMManager.h @@ -42,4 +42,4 @@ private slots: void closeRequest(int index); }; -#endif // IM_MANAGER \ No newline at end of file +#endif // IM_MANAGER diff --git a/kde/src/widgets/IMTab.cpp b/kde/src/widgets/IMTab.cpp index 5c2080da37ccf40da2fc1204f425108b4690643e..14ee34c4f2097cd1a7d0b598f80784607829328e 100644 --- a/kde/src/widgets/IMTab.cpp +++ b/kde/src/widgets/IMTab.cpp @@ -93,4 +93,4 @@ IMTab::IMTab(InstantMessagingModel* model,QWidget* parent) : QListView(parent) void IMTab::scrollBottom() { scrollTo(model()->index(model()->rowCount()-1,0)); -} \ No newline at end of file +} diff --git a/kde/src/widgets/IMTab.h b/kde/src/widgets/IMTab.h index 991c75b193fa1ffb18f329273cc9cae05aee95fd..a0477e6a1a6412546f2a02dbfe1b7a0d01e415fa 100644 --- a/kde/src/widgets/IMTab.h +++ b/kde/src/widgets/IMTab.h @@ -31,7 +31,7 @@ class ImDelegates : public QStyledItemDelegate { Q_OBJECT public: - ImDelegates(IMTab* parent = nullptr); + explicit ImDelegates(IMTab* parent = nullptr); protected: virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; @@ -43,9 +43,9 @@ class IMTab : public QListView { Q_OBJECT public: - IMTab(InstantMessagingModel* model,QWidget* parent = nullptr); + explicit IMTab(InstantMessagingModel* model,QWidget* parent = nullptr); private slots: void scrollBottom(); }; -#endif // IM_MANAGER \ No newline at end of file +#endif // IM_MANAGER diff --git a/kde/src/widgets/SFLPhoneTray.cpp b/kde/src/widgets/SFLPhoneTray.cpp index b53347681947deab3cf842d97cbc5426d1c50ca5..36e34a15025fe029696b82f9b176ec0a7fbd9939 100755 --- a/kde/src/widgets/SFLPhoneTray.cpp +++ b/kde/src/widgets/SFLPhoneTray.cpp @@ -62,4 +62,4 @@ void SFLPhoneTray::addAction(KAction *action) void SFLPhoneTray::addSeparator() { m_pTrayIconMenu->addSeparator(); -} \ No newline at end of file +} diff --git a/kde/src/widgets/SFLPhoneTray.h b/kde/src/widgets/SFLPhoneTray.h index bdd811f4bf6bc4f93f8e66d2830a13e3b0a2359b..825ca9eb0a4f644feff491afbc45b65a77808de6 100755 --- a/kde/src/widgets/SFLPhoneTray.h +++ b/kde/src/widgets/SFLPhoneTray.h @@ -38,7 +38,7 @@ Q_OBJECT public: //Constructor - SFLPhoneTray(QIcon icon, QWidget *parent = 0); + explicit SFLPhoneTray(QIcon icon, QWidget *parent = 0); ~SFLPhoneTray(); //Mutators diff --git a/kde/src/widgets/TranslucentButtons.cpp b/kde/src/widgets/TranslucentButtons.cpp index 42a69f49123c0b50a44d33e08f60ccc53932aa88..0b1ab5b9ec93270cc782625e34f98ace2e065e51 100644 --- a/kde/src/widgets/TranslucentButtons.cpp +++ b/kde/src/widgets/TranslucentButtons.cpp @@ -43,7 +43,7 @@ void TranslucentButtons::paintEvent(QPaintEvent* event) QFont font = customPainter.font(); font.setBold(true); customPainter.setFont(font); - customPainter.drawText (rect(), Qt::AlignVCenter|Qt::AlignHCenter, text().replace("&","") ); + customPainter.drawText (rect(), Qt::AlignVCenter|Qt::AlignHCenter, text().remove('&') ); } ///Override the visibility toggler @@ -126,4 +126,4 @@ void TranslucentButtons::setHoverState(bool hover) void TranslucentButtons::setPixmap(QImage* img) { m_pImg = img; -} \ No newline at end of file +} diff --git a/kde/src/widgets/TranslucentButtons.h b/kde/src/widgets/TranslucentButtons.h index 4b01b846114c439c1f7670cc17d985a0af7a23f4..9f45c068b143e67512b7b0b98fc2d4ab6ec36b10 100644 --- a/kde/src/widgets/TranslucentButtons.h +++ b/kde/src/widgets/TranslucentButtons.h @@ -46,4 +46,4 @@ signals: ///Emitted when data is dropped on the button void dataDropped(QMimeData*); }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/widgets/VideoDock.cpp b/kde/src/widgets/VideoDock.cpp index 4cd47db09f675c5ecdf73ad1d2f9d19c37ee53dc..5e82a588b779e96b8fc7354e07973f2475c82302 100644 --- a/kde/src/widgets/VideoDock.cpp +++ b/kde/src/widgets/VideoDock.cpp @@ -28,7 +28,7 @@ ///Constructor VideoDock::VideoDock(QWidget* parent) : QDockWidget(parent) { - setWindowTitle(i18n("Video")); + setWindowTitle(i18nc("Video conversation","Video")); QWidget* wdg = new QWidget(this); m_pVideoWidet = new VideoWidget(this); auto l = new QGridLayout(wdg); @@ -43,4 +43,4 @@ VideoDock::VideoDock(QWidget* parent) : QDockWidget(parent) void VideoDock::setRenderer(VideoRenderer* r) { m_pVideoWidet->setRenderer(r); -} \ No newline at end of file +} diff --git a/kde/src/widgets/VideoDock.h b/kde/src/widgets/VideoDock.h index 93d2ca04845db43b2e5cc129777d5266e13328b6..7ae7827f73151e240ef929fa68e4df1e01d00b99 100644 --- a/kde/src/widgets/VideoDock.h +++ b/kde/src/widgets/VideoDock.h @@ -42,4 +42,4 @@ private slots: }; -#endif \ No newline at end of file +#endif diff --git a/kde/src/widgets/VideoWidget.cpp b/kde/src/widgets/VideoWidget.cpp index c7c7087bed58f1d5263329013552d05b10c7e5d0..e0b06952b4e3233b6ac80538fab5d5be2aa0d106 100644 --- a/kde/src/widgets/VideoWidget.cpp +++ b/kde/src/widgets/VideoWidget.cpp @@ -80,4 +80,4 @@ void VideoWidget::stop() delete m_Image; m_Image = nullptr; } -} \ No newline at end of file +} diff --git a/kde/src/widgets/VideoWidget.h b/kde/src/widgets/VideoWidget.h index 2cd69b7b487cc6a486d14be5ec9cc33e90c3d63e..0e603a01eec6889677cad93990c8bd3fab6381cf 100644 --- a/kde/src/widgets/VideoWidget.h +++ b/kde/src/widgets/VideoWidget.h @@ -29,7 +29,7 @@ class VideoRenderer; class VideoWidget : public QWidget { Q_OBJECT public: - VideoWidget(QWidget* parent =0, VideoRenderer* renderer = VideoModel::getInstance()->getPreviewRenderer()); + explicit VideoWidget(QWidget* parent =0, VideoRenderer* renderer = VideoModel::getInstance()->getPreviewRenderer()); private: QImage* m_Image; VideoRenderer* m_pRenderer; @@ -44,4 +44,4 @@ public slots: }; -#endif \ No newline at end of file +#endif