Commit 24c90366 authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

[ #13801 ] Fix about 200 Krazy2 notification/warning/comments

parent 3a099cd3
......@@ -52,4 +52,4 @@ typedef QMap<QString, int> MapStringInt;
#endif
#endif
\ No newline at end of file
#endif
......@@ -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"
......
#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"
#include <QString>
#include <QtCore/QString>
#include <QtTest>
#include <QtCore>
......
#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"
......@@ -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
}
......@@ -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
......@@ -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
......@@ -65,4 +65,4 @@ private slots:
void reload();
};
#endif
\ No newline at end of file
#endif
/***************************************************************************
* 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()+' ');
}
......@@ -198,4 +198,4 @@ void CategorizedTreeWidget::removeItem(QTreeWidgetItem* item)
}
}
}
}
\ No newline at end of file
}
......@@ -89,4 +89,4 @@ template <class T> T* CategorizedTreeWidget::addCategory(QString name)
return categoryItem;
}
#endif
\ No newline at end of file
#endif
......@@ -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 */;
}
......@@ -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);
......
/***************************************************************************
* 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
}
......@@ -70,4 +70,4 @@ Dialpad::~Dialpad()
void Dialpad::clicked(QString& text)
{
emit typed(text);
}
\ No newline at end of file
}
......@@ -75,4 +75,4 @@ signals:
void typed(QString text);
};
#endif
\ No newline at end of file
#endif
......@@ -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
......@@ -122,4 +122,4 @@ private:
HistoryDock* m_pDock;
};
#endif
\ No newline at end of file
#endif
/***************************************************************************
* 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
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment