Commit 6d8b966c authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Use clazy for fixing some errors

parent a76dcec9
......@@ -92,7 +92,7 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, bool firstRun )
addPage(d->finish,d->finish->windowTitle());
// add the available messenger services to the dialogs list
QList<KPluginInfo> protocols = Kopete::PluginManager::self()->availablePlugins("Protocols");
QList<KPluginInfo> protocols = Kopete::PluginManager::self()->availablePlugins(QStringLiteral("Protocols"));
qSort(protocols);
for (QList<KPluginInfo>::Iterator it = protocols.begin(); it != protocols.end(); ++it)
{
......@@ -244,7 +244,7 @@ void AddAccountWizard::accept()
}
// Make sure the protocol is correctly enabled. This is not really needed, but still good
const QString PROTO_NAME = d->proto->pluginId().remove("Protocol").toLower();
const QString PROTO_NAME = d->proto->pluginId().remove(QStringLiteral("Protocol")).toLower();
Kopete::PluginManager::self()->setPluginEnabled(PROTO_NAME , true);
// setup the custom colour
......@@ -278,7 +278,7 @@ void AddAccountWizard::reject()
}
if(hasAccount)
{
const QString PROTO_NAME = d->proto->pluginId().remove("Protocol").toLower();
const QString PROTO_NAME = d->proto->pluginId().remove(QStringLiteral("Protocol")).toLower();
Kopete::PluginManager::self()->unloadPlugin(PROTO_NAME);
}
}
......
......@@ -38,6 +38,6 @@ ChatWindowAccessibleWidgetFactory::ChatWindowAccessibleWidgetFactory( QObject *p
QStringList ChatWindowAccessibleWidgetFactory::keys() const
{
QStringList l;
l.append( QLatin1String( "KHTMLView" ) );
l.append( QStringLiteral( "KHTMLView" ) );
return l;
}
This diff is collapsed.
......@@ -77,7 +77,7 @@ void ChatTextEditPart::init( Kopete::ChatSession *session, QWidget *parent)
setWidget( editor );
// TODO: Rename rc file
setXMLFile( "kopeterichtexteditpart/kopeterichtexteditpartfull.rc" );
setXMLFile( QStringLiteral("kopeterichtexteditpart/kopeterichtexteditpartfull.rc") );
historyPos = -1;
......@@ -93,9 +93,9 @@ void ChatTextEditPart::init( Kopete::ChatSession *session, QWidget *parent)
// timers for typing notifications
m_typingRepeatTimer = new QTimer(this);
m_typingRepeatTimer->setObjectName("m_typingRepeatTimer");
m_typingRepeatTimer->setObjectName(QStringLiteral("m_typingRepeatTimer"));
m_typingStopTimer = new QTimer(this);
m_typingStopTimer->setObjectName("m_typingStopTimer");
m_typingStopTimer->setObjectName(QStringLiteral("m_typingStopTimer"));
connect( m_typingRepeatTimer, SIGNAL(timeout()), this, SLOT(slotRepeatTypingTimer()) );
connect( m_typingStopTimer, SIGNAL(timeout()), this, SLOT(slotStoppedTypingTimer()) );
......@@ -264,7 +264,7 @@ void ChatTextEditPart::sendMessage()
{
QString txt = this->text( Qt::PlainText );
// avoid sending emtpy messages or enter keys (see bug 100334)
if ( txt.isEmpty() || txt == "\n" )
if ( txt.isEmpty() || txt == QLatin1String("\n") )
return;
if ( m_lastMatch.isNull() && ( txt.indexOf( QRegExp( QLatin1String("^\\w+:\\s") ) ) > -1 ) )
......@@ -468,7 +468,7 @@ void ChatTextEditPart::slotAppearanceChanged()
editor->setDefaultPlainCharFormat(format);
editor->setDefaultRichCharFormat(format);
QString styleSheet = QLatin1String("QTextEdit { color: %1; }");
QString styleSheet = QStringLiteral("QTextEdit { color: %1; }");
editor->setStyleSheet(styleSheet.arg(settings->chatTextColor().name()));
}
......
......@@ -256,7 +256,7 @@ void ChatView::clear()
{
response = KMessageBox::warningContinueCancel( this, i18n("<qt>You have received a message from <b>%1</b> in the last "
"second. Are you sure you want to clear this chat?</qt>", unreadMessageFrom ), i18n( "Unread Message" ),
KGuiItem( i18nc( "@action:button", "Clear Chat" ) ), KStandardGuiItem::cancel(), QLatin1String("AskClearChatRecentMessage" ) );
KGuiItem( i18nc( "@action:button", "Clear Chat" ) ), KStandardGuiItem::cancel(), QStringLiteral("AskClearChatRecentMessage" ) );
}
if ( response == KMessageBox::Continue )
......@@ -316,7 +316,7 @@ void ChatView::makeVisible()
if ( !m_mainWindow )
{
m_mainWindow = KopeteChatWindow::window( m_manager );
m_mainWindow->setObjectName( QLatin1String("KopeteChatWindow") );
m_mainWindow->setObjectName( QStringLiteral("KopeteChatWindow") );
// if ( root )
// root->repaint( true );
emit windowCreated();
......@@ -357,21 +357,21 @@ bool ChatView::closeView( bool force )
response = KMessageBox::warningContinueCancel( this, i18n("<qt>You are about to leave the groupchat session <b>%1</b>.<br />"
"You will not receive future messages from this conversation.</qt>", shortCaption ), i18n( "Closing Group Chat" ),
KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QLatin1String( "AskCloseGroupChat" ) );
KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QStringLiteral( "AskCloseGroupChat" ) );
}
if ( !unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) )
{
response = KMessageBox::warningContinueCancel( this, i18n("<qt>You have received a message from <b>%1</b> in the last "
"second. Are you sure you want to close this chat?</qt>", unreadMessageFrom ), i18n( "Unread Message" ),
KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QLatin1String("AskCloseChatRecentMessage" ) );
KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QStringLiteral("AskCloseChatRecentMessage" ) );
}
if ( d->sendInProgress && ( response == KMessageBox::Continue ) )
{
response = KMessageBox::warningContinueCancel( this, i18n( "You have a message send in progress, which will be "
"aborted if this chat is closed. Are you sure you want to close this chat?" ), i18n( "Message in Transit" ),
KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QLatin1String( "AskCloseChatMessageInProgress" ) );
KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QStringLiteral( "AskCloseChatMessageInProgress" ) );
}
}
......@@ -672,7 +672,7 @@ void ChatView::setCaption( const QString &text, bool modified )
//Call the original set caption
QWidget::setWindowTitle( newCaption );
emit updateChatTooltip( this, QString::fromLatin1("<qt>%1</qt>").arg( d->captionText ) );
emit updateChatTooltip( this, QStringLiteral("<qt>%1</qt>").arg( d->captionText ) );
emit updateChatLabel( this, newCaption );
//Blink icon if modified and not active
if( !d->isActive && modified )
......@@ -810,8 +810,8 @@ void ChatView::messageSentSuccessfully()
void ChatView::saveOptions()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup kopeteChatWindowMainWinSettings( config, ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
kopeteChatWindowMainWinSettings.writeEntry( QLatin1String("ChatViewSplitter"), d->splitter->saveState().toBase64() );
KConfigGroup kopeteChatWindowMainWinSettings( config, ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QStringLiteral( "KopeteChatWindowGroupMode" ) : QStringLiteral( "KopeteChatWindowIndividualMode" ) ) );
kopeteChatWindowMainWinSettings.writeEntry( QStringLiteral("ChatViewSplitter"), d->splitter->saveState().toBase64() );
saveChatSettings();
config->sync();
}
......@@ -865,10 +865,10 @@ void ChatView::loadChatSettings()
void ChatView::readOptions()
{
KConfigGroup kopeteChatWindowMainWinSettings( KSharedConfig::openConfig(), ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
KConfigGroup kopeteChatWindowMainWinSettings( KSharedConfig::openConfig(), ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QStringLiteral( "KopeteChatWindowGroupMode" ) : QStringLiteral( "KopeteChatWindowIndividualMode" ) ) );
//kDebug(14000) << "reading splitterpos from key: " << dockKey;
QByteArray state;
state = kopeteChatWindowMainWinSettings.readEntry( QLatin1String("ChatViewSplitter"), state );
state = kopeteChatWindowMainWinSettings.readEntry( QStringLiteral("ChatViewSplitter"), state );
d->splitter->restoreState( QByteArray::fromBase64( state ) );
}
......@@ -930,9 +930,9 @@ void ChatView::dragMoveEvent( QDragMoveEvent * event )
bool ChatView::isDragEventAccepted( const QDragMoveEvent * event ) const
{
if( event->mimeData()->hasFormat( "application/kopete.metacontacts.list" ) )
if( event->mimeData()->hasFormat( QStringLiteral("application/kopete.metacontacts.list") ) )
{
QByteArray encodedData = event->mimeData()->data( "application/kopete.metacontacts.list" );
QByteArray encodedData = event->mimeData()->data( QStringLiteral("application/kopete.metacontacts.list") );
QDataStream stream( &encodedData, QIODevice::ReadOnly );
QString metacontactID;
stream >> metacontactID;
......@@ -968,9 +968,9 @@ void ChatView::dropEvent ( QDropEvent * event )
{
Kopete::ContactPtrList contacts;
if( event->mimeData()->hasFormat("application/kopete.metacontacts.list") )
if( event->mimeData()->hasFormat(QStringLiteral("application/kopete.metacontacts.list")) )
{
QByteArray encodedData = event->mimeData()->data( "application/kopete.metacontacts.list" );
QByteArray encodedData = event->mimeData()->data( QStringLiteral("application/kopete.metacontacts.list") );
QDataStream stream( &encodedData, QIODevice::ReadOnly );
QString metacontactID;
stream >> metacontactID;
......@@ -989,7 +989,7 @@ void ChatView::dropEvent ( QDropEvent * event )
}
}
}
else if ( event->mimeData()->hasFormat( "text/uri-list") && m_manager->members().count() == 1 )
else if ( event->mimeData()->hasFormat( QStringLiteral("text/uri-list")) && m_manager->members().count() == 1 )
{
Kopete::ContactPtrList members = m_manager->members();
Kopete::Contact *contact = members.first();
......
This diff is collapsed.
......@@ -73,7 +73,7 @@ ChatWindowStyle::ChatWindowStyle(const QString &styleName, const QString &varian
void ChatWindowStyle::init(const QString &styleName, StyleBuildMode styleBuildMode)
{
QStringList styleDirs = KGlobal::dirs()->findDirs("appdata", QString("styles/%1/Contents/Resources/").arg(styleName));
QStringList styleDirs = KGlobal::dirs()->findDirs("appdata", QStringLiteral("styles/%1/Contents/Resources/").arg(styleName));
if(styleDirs.isEmpty())
{
kDebug(14000) << "Failed to find style" << styleName;
......@@ -205,20 +205,20 @@ bool ChatWindowStyle::hasActionTemplate() const
void ChatWindowStyle::listVariants()
{
QString variantDirPath = d->baseHref + QString::fromUtf8("Variants/");
QString variantDirPath = d->baseHref + QLatin1String("Variants/");
QDir variantDir(variantDirPath);
QStringList variantList = variantDir.entryList( QStringList("*.css") );
QStringList variantList = variantDir.entryList( QStringList(QStringLiteral("*.css")) );
QStringList::ConstIterator it, itEnd = variantList.constEnd();
QLatin1String compactVersionPrefix("_compact_");
for(it = variantList.constBegin(); it != itEnd; ++it)
{
QString variantName = *it, variantPath;
// Retrieve only the file name.
variantName = variantName.left(variantName.lastIndexOf("."));
variantName = variantName.left(variantName.lastIndexOf(QLatin1String(".")));
if ( variantName.startsWith( compactVersionPrefix ) ) {
if ( variantName == compactVersionPrefix ) {
d->compactVariants.insert( "", true );
d->compactVariants.insert( QLatin1String(""), true );
}
continue;
}
......@@ -228,28 +228,28 @@ void ChatWindowStyle::listVariants()
d->compactVariants.insert( variantName, true );
}
// variantPath is relative to baseHref.
variantPath = QString("Variants/%1").arg(*it);
variantPath = QStringLiteral("Variants/%1").arg(*it);
d->variantsList.insert(variantName, variantPath);
}
}
void ChatWindowStyle::readStyleFiles()
{
QString headerFile = d->baseHref + QString("Header.html");
QString footerFile = d->baseHref + QString("Footer.html");
QString incomingFile = d->baseHref + QString("Incoming/Content.html");
QString nextIncomingFile = d->baseHref + QString("Incoming/NextContent.html");
QString outgoingFile = d->baseHref + QString("Outgoing/Content.html");
QString nextOutgoingFile = d->baseHref + QString("Outgoing/NextContent.html");
QString statusFile = d->baseHref + QString("Status.html");
QString actionIncomingFile = d->baseHref + QString("Incoming/Action.html");
QString actionOutgoingFile = d->baseHref + QString("Outgoing/Action.html");
QString fileTransferIncomingFile = d->baseHref + QString("Incoming/FileTransferRequest.html");
QString voiceClipIncomingFile = d->baseHref + QString("Incoming/voiceClipRequest.html");
QString outgoingStateUnknownFile = d->baseHref + QString("Outgoing/StateUnknown.html");
QString outgoingStateSendingFile = d->baseHref + QString("Outgoing/StateSending.html");
QString outgoingStateSentFile = d->baseHref + QString("Outgoing/StateSent.html");
QString outgoingStateErrorFile = d->baseHref + QString("Outgoing/StateError.html");
QString headerFile = d->baseHref + QStringLiteral("Header.html");
QString footerFile = d->baseHref + QStringLiteral("Footer.html");
QString incomingFile = d->baseHref + QStringLiteral("Incoming/Content.html");
QString nextIncomingFile = d->baseHref + QStringLiteral("Incoming/NextContent.html");
QString outgoingFile = d->baseHref + QStringLiteral("Outgoing/Content.html");
QString nextOutgoingFile = d->baseHref + QStringLiteral("Outgoing/NextContent.html");
QString statusFile = d->baseHref + QStringLiteral("Status.html");
QString actionIncomingFile = d->baseHref + QStringLiteral("Incoming/Action.html");
QString actionOutgoingFile = d->baseHref + QStringLiteral("Outgoing/Action.html");
QString fileTransferIncomingFile = d->baseHref + QStringLiteral("Incoming/FileTransferRequest.html");
QString voiceClipIncomingFile = d->baseHref + QStringLiteral("Incoming/voiceClipRequest.html");
QString outgoingStateUnknownFile = d->baseHref + QStringLiteral("Outgoing/StateUnknown.html");
QString outgoingStateSendingFile = d->baseHref + QStringLiteral("Outgoing/StateSending.html");
QString outgoingStateSentFile = d->baseHref + QStringLiteral("Outgoing/StateSent.html");
QString outgoingStateErrorFile = d->baseHref + QStringLiteral("Outgoing/StateError.html");
QFile fileAccess;
// First load header file.
......@@ -365,8 +365,8 @@ void ChatWindowStyle::readStyleFiles()
}
if ( d->fileTransferIncomingHtml.isEmpty() ||
( !d->fileTransferIncomingHtml.contains( "saveFileHandlerId" ) &&
!d->fileTransferIncomingHtml.contains( "saveFileAsHandlerId" ) ) )
( !d->fileTransferIncomingHtml.contains( QLatin1String("saveFileHandlerId") ) &&
!d->fileTransferIncomingHtml.contains( QLatin1String("saveFileAsHandlerId") ) ) )
{ // Create default html
d->fileTransferIncomingHtml = d->incomingHtml;
QString message = QString( "%message%\n"
......@@ -399,8 +399,8 @@ void ChatWindowStyle::readStyleFiles()
}
if ( d->voiceClipIncomingHtml.isEmpty() ||
( !d->voiceClipIncomingHtml.contains( "playVoiceHandlerId" ) &&
!d->voiceClipIncomingHtml.contains( "saveAsVoiceHandlerId" ) ) )
( !d->voiceClipIncomingHtml.contains( QLatin1String("playVoiceHandlerId") ) &&
!d->voiceClipIncomingHtml.contains( QLatin1String("saveAsVoiceHandlerId") ) ) )
{ // Create default html
d->voiceClipIncomingHtml = d->incomingHtml;
QString message = QString( "%message%\n"
......@@ -484,8 +484,8 @@ QString ChatWindowStyle::compact( const QString & styleVariant ) const
{
QString compacted = styleVariant;
if ( styleVariant.isEmpty() ) {
return QLatin1String( "Variants/_compact_.css" );
return QStringLiteral( "Variants/_compact_.css" );
} else {
return compacted.insert( compacted.lastIndexOf('/') + 1, QString("_compact_") );
return compacted.insert( compacted.lastIndexOf('/') + 1, QStringLiteral("_compact_") );
}
}
......@@ -85,9 +85,9 @@ ChatWindowStyleManager::~ChatWindowStyleManager()
void ChatWindowStyleManager::loadStyles()
{
// Make sure there exists a directory where chat styles can be installed to and it will be watched for changes
KStandardDirs::locateLocal( "appdata", QLatin1String( "styles/" ) );
KStandardDirs::locateLocal( "appdata", QStringLiteral( "styles/" ) );
QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QLatin1String( "styles" ) );
QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QStringLiteral( "styles" ) );
foreach(const QString &styleDir, chatStyles)
{
kDebug(14000) << styleDir;
......@@ -112,7 +112,7 @@ QStringList ChatWindowStyleManager::getAvailableStyles() const
int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
{
QString localStyleDir;
QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QLatin1String( "styles" ) );
QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QStringLiteral( "styles" ) );
// findDirs returns preferred paths first, let's check if one of them is writable
foreach(const QString& styleDir, chatStyles)
{
......@@ -133,11 +133,11 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
// Find mimetype for current bundle. ZIP and KTar need separate constructor
QString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name();
if(currentBundleMimeType == "application/zip")
if(currentBundleMimeType == QLatin1String("application/zip"))
{
archive = new KZip(styleBundlePath);
}
else if( currentBundleMimeType == "application/x-compressed-tar" || currentBundleMimeType == "application/x-bzip-compressed-tar" || currentBundleMimeType == "application/x-gzip" || currentBundleMimeType == "application/x-bzip" )
else if( currentBundleMimeType == QLatin1String("application/x-compressed-tar") || currentBundleMimeType == QLatin1String("application/x-bzip-compressed-tar") || currentBundleMimeType == QLatin1String("application/x-gzip") || currentBundleMimeType == QLatin1String("application/x-bzip") )
{
archive = new KTar(styleBundlePath);
}
......@@ -174,52 +174,52 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
currentDir = dynamic_cast<KArchiveDirectory*>( currentEntry );
if (currentDir)
{
if( currentDir->entry(QString::fromUtf8("Contents")) )
if( currentDir->entry(QStringLiteral("Contents")) )
{
// qDebug() << "Contents found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources")) )
if( currentDir->entry(QStringLiteral("Contents/Resources")) )
{
// qDebug() << "Contents/Resources found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/Incoming")) )
{
// qDebug() << "Contents/Resources/Incoming found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/Outgoing")) )
{
// qDebug() << "Contents/Resources/Outgoing found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/main.css")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/main.css")) )
{
// qDebug() << "Contents/Resources/main.css found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/Footer.html")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/Footer.html")) )
{
// qDebug() << "Contents/Resources/Footer.html found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/Status.html")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/Status.html")) )
{
// qDebug() << "Contents/Resources/Status.html found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/Header.html")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/Header.html")) )
{
// qDebug() << "Contents/Resources/Header.html found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming/Content.html")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/Incoming/Content.html")) )
{
// qDebug() << "Contents/Resources/Incoming/Content.html found";
validResult += 1;
}
if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing/Content.html")) )
if( currentDir->entry(QStringLiteral("Contents/Resources/Outgoing/Content.html")) )
{
// qDebug() << "Contents/Resources/Outgoing/Content.html found";
validResult += 1;
......@@ -238,7 +238,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
if(currentEntry && currentEntry->isDirectory())
{
// Ignore this MacOS X "garbage" directory in zip.
if(currentEntry->name() == QString::fromUtf8("__MACOSX"))
if(currentEntry->name() == QLatin1String("__MACOSX"))
{
continue;
}
......@@ -297,7 +297,7 @@ bool ChatWindowStyleManager::removeStyle(const QString &styleName)
delete deletedStyle;
}
QStringList styleDirs = KGlobal::dirs()->findDirs("appdata", QString("styles/%1").arg(styleName));
QStringList styleDirs = KGlobal::dirs()->findDirs("appdata", QStringLiteral("styles/%1").arg(styleName));
if(styleDirs.isEmpty())
{
kDebug(14000) << "Failed to find style" << styleName;
......@@ -330,7 +330,7 @@ ChatWindowStyle *ChatWindowStyleManager::getValidStyleFromPool(const QString &st
kDebug(14000) << "Trying default style";
// Try default style
style = getStyleFromPool( "Kopete" );
style = getStyleFromPool( QStringLiteral("Kopete") );
if ( style )
return style;
......@@ -386,7 +386,7 @@ void ChatWindowStyleManager::slotNewStyles(const KFileItemList &dirList)
foreach(const KFileItem &item, dirList)
{
// Ignore data dir(from deprecated XSLT themes)
if( !item.url().fileName().contains(QString::fromUtf8("data")) )
if( !item.url().fileName().contains(QLatin1String("data")) )
{
kDebug(14000) << "Listing: " << item.url().fileName();
// If the style path is already in the pool, that's mean the style was updated on disk
......
......@@ -187,7 +187,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP
toggleMode( Send );
KSharedConfig::Ptr config = KSharedConfig::openConfig();
applyMainWindowSettings( config->group( QLatin1String( "KopeteEmailWindow" ) ) );
applyMainWindowSettings( config->group( QStringLiteral( "KopeteEmailWindow" ) ) );
d->sendInProgress = false;
......@@ -204,7 +204,7 @@ KopeteEmailWindow::~KopeteEmailWindow()
emit( closing( this ) );
// saves menubar, toolbar and statusbar setting
KConfigGroup cg( KSharedConfig::openConfig(), QLatin1String( "KopeteEmailWindow" ) );
KConfigGroup cg( KSharedConfig::openConfig(), QStringLiteral( "KopeteEmailWindow" ) );
saveMainWindowSettings( cg );
cg.sync();
......@@ -215,8 +215,8 @@ void KopeteEmailWindow::initActions(void)
{
KActionCollection *coll = actionCollection();
d->chatSend = new QAction( QIcon::fromTheme("mail-send"), i18n( "&Send Message" ), this );
coll->addAction( "chat_send", d->chatSend );
d->chatSend = new QAction( QIcon::fromTheme(QStringLiteral("mail-send")), i18n( "&Send Message" ), this );
coll->addAction( QStringLiteral("chat_send"), d->chatSend );
//Default to 'Return' for sending messages
d->chatSend->setShortcut( QKeySequence( Qt::Key_Return ) );
connect( d->chatSend, SIGNAL(triggered()), this, SLOT(slotReplySend()) );
......@@ -248,7 +248,7 @@ void KopeteEmailWindow::initActions(void)
setStandardToolBarMenuEnabled( true );
d->actionSmileyMenu = new KopeteEmoticonAction( coll );
coll->addAction( "format_smiley", d->actionSmileyMenu );
coll->addAction( QStringLiteral("format_smiley"), d->actionSmileyMenu );
d->actionSmileyMenu->setDelayed( false );
connect(d->actionSmileyMenu, SIGNAL(activated(QString)), this, SLOT(slotSmileyActivated(QString)));
......@@ -259,25 +259,25 @@ void KopeteEmailWindow::initActions(void)
KopeteStdAction::preferences( coll , "settings_prefs" );
// The animated toolbarbutton
d->normalIcon = QPixmap( BarIcon( QLatin1String( "kopete" ) ) );
d->normalIcon = QPixmap( BarIcon( QStringLiteral( "kopete" ) ) );
// d->animIcon = KGlobal::iconLoader()->loadMovie( QLatin1String( "newmessage" ), KIconLoader::Toolbar);
d->animIcon.setPaused(true);
d->anim = new QLabel( this );
d->anim->setObjectName( QLatin1String("kde toolbar widget") );
d->anim->setObjectName( QStringLiteral("kde toolbar widget") );
d->anim->setMargin( 5 );
d->anim->setPixmap( d->normalIcon );
QAction *spacerAction = new KToolBarSpacerAction( this );
spacerAction->setText( i18n( "Spacer for Animation" ) );
coll->addAction( "toolbar_spacer", spacerAction );
coll->addAction( QStringLiteral("toolbar_spacer"), spacerAction );
QAction *animAction = new QAction( i18n("Toolbar Animation"), coll );
coll->addAction( "toolbar_animation", animAction );
coll->addAction( QStringLiteral("toolbar_animation"), animAction );
//FIXME: setDefaultWidget() is a method in QWidgetAction
//animAction->setDefaultWidget( d->anim );
setXMLFile( QLatin1String( "kopeteemailwindow.rc" ) );
setXMLFile( QStringLiteral( "kopeteemailwindow.rc" ) );