Commit 1b8764a4 authored by Laurent Montel's avatar Laurent Montel 😁

Continue to compile with "-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII"

svn path=/trunk/KDE/kdegames/ksirk/; revision=1179483
parent e95b94ec
......@@ -1186,7 +1186,7 @@ bool GameAutomaton::joinNetworkGame()
{
kDebug();
if (stateName() == "INIT"
|| (KMessageBox::warningContinueCancel(m_game,i18n("Do you really want to end your current game and join another?"),i18n("New game confirmation"),KStandardGuiItem::yes()) == KMessageBox::Continue))
|| (KMessageBox::warningContinueCancel(m_game,i18n("Do you really want to end your current game and join another?"),i18n( "New game confirmation" ),KStandardGuiItem::yes()) == KMessageBox::Continue))
{
m_game->joinNetworkGame();
}
......@@ -1214,7 +1214,7 @@ bool GameAutomaton::connectToServ()
bool GameAutomaton::joinJabberGame(const QString& nick)
{
if (stateName() == "INIT" || (KMessageBox::warningContinueCancel(m_game,i18n("Do you really want to end your current game and join another?"),i18n("New game confirmation"),KStandardGuiItem::yes()) == KMessageBox::Continue))
if (stateName() == "INIT" || (KMessageBox::warningContinueCancel(m_game,i18n("Do you really want to end your current game and join another?"),i18n( "New game confirmation" ),KStandardGuiItem::yes()) == KMessageBox::Continue))
{
// stop game
setGameStatus(KGame::End);
......
......@@ -379,7 +379,7 @@ void JabberBaseContact::serialize (QMap < QString, QString > &serializedData, QM
// Contact id and display name are already set for us, only add the rest
serializedData["JID"] = mRosterItem.jid().full();
serializedData["groups"] = mRosterItem.groups ().join (QString::fromLatin1 (","));
serializedData["groups"] = mRosterItem.groups ().join ( QLatin1String( QString::fromLatin1 ("," )));
}
void JabberBaseContact::slotUserInfo( )
......@@ -486,8 +486,8 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
if( !vCard.org().name.isEmpty() )
setProperty( protocol()->propCompanyName, vCard.org().name );
if( !vCard.org().unit.join(",").isEmpty() )
setProperty( protocol()->propCompanyDepartement, vCard.org().unit.join(",")) ;
if( !vCard.org().unit.join( QLatin1String( "," )).isEmpty() )
setProperty( protocol()->propCompanyDepartement, vCard.org().unit.join( QLatin1String( "," ))) ;
if( !vCard.title().isEmpty() )
setProperty( protocol()->propCompanyPosition, vCard.title() );
if( !vCard.role().isEmpty() )
......
......@@ -131,7 +131,7 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid)
KAction * JabberBookmarks::bookmarksAction(QObject * /*parent*/)
{
KSelectAction *groupchatBM = new KSelectAction( this );
groupchatBM->setIcon( KIcon("jabber_group") );
groupchatBM->setIcon( KIcon( QLatin1String( "jabber_group" )) );
groupchatBM->setText( i18n("Groupchat bookmark") );
groupchatBM->setItems(m_conferencesJID);
QObject::connect(groupchatBM, SIGNAL(triggered(const QString&)) , this , SLOT(slotJoinChatBookmark(const QString&)));
......
......@@ -134,32 +134,32 @@ QList<KAction*> *JabberContact::customContextMenuActions ()
QList<KAction*> *actionCollection = new QList<KAction*>();
KActionMenu *actionAuthorization = new KActionMenu ( KIcon("network-connect"), i18n ("Authorization"), this);
KActionMenu *actionAuthorization = new KActionMenu ( KIcon( QLatin1String( "network-connect"), i18n ("Authorization" )), this);
KAction *resendAuthAction, *requestAuthAction, *removeAuthAction;
resendAuthAction = new KAction( this );
resendAuthAction->setIcon( (KIcon("mail-forward") ) );
resendAuthAction->setIcon( (KIcon( QLatin1String( "mail-forward" )) ) );
resendAuthAction->setText( i18n ("(Re)send Authorization To") );
resendAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::To || mRosterItem.subscription().type() == XMPP::Subscription::None );
connect(resendAuthAction, SIGNAL(triggered(bool)), SLOT(slotSendAuth()));
actionAuthorization->addAction(resendAuthAction);
requestAuthAction = new KAction( this );
requestAuthAction->setIcon( (KIcon("mail-reply-sender") ) );
requestAuthAction->setIcon( (KIcon( QLatin1String( "mail-reply-sender" )) ) );
requestAuthAction->setText( i18n ("(Re)request Authorization From") );
requestAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::From || mRosterItem.subscription().type() == XMPP::Subscription::None );
connect(requestAuthAction, SIGNAL(triggered(bool)), SLOT(slotRequestAuth()));
actionAuthorization->addAction(requestAuthAction);
removeAuthAction = new KAction( this );
removeAuthAction->setIcon( (KIcon("edit-delete") ) );
removeAuthAction->setIcon( (KIcon( QLatin1String( "edit-delete" )) ) );
removeAuthAction->setText( i18n ("Remove Authorization From") );
removeAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::Both || mRosterItem.subscription().type() == XMPP::Subscription::From );
connect(removeAuthAction, SIGNAL(triggered(bool)), SLOT(slotRemoveAuth()));
actionAuthorization->addAction(removeAuthAction);
KActionMenu *actionSetAvailability = new KActionMenu ( KIcon("user-identity", 0, QStringList() << QString() << "user-online"), i18n ("Set Availability"), this );
KActionMenu *actionSetAvailability = new KActionMenu ( KIcon( QLatin1String( "user-identity", 0, QStringList() << QString() << "user-online"), i18n ("Set Availability" )), this );
#define KACTION(status, text, name, slot) \
{ KAction *tmp = new KAction(this); \
......@@ -215,7 +215,7 @@ QList<KAction*> *JabberContact::customContextMenuActions ()
if( i == activeItem )
{
KAction *tmp = new KAction( this );
tmp->setIcon( KIcon("dialog-ok") );
tmp->setIcon( KIcon( QLatin1String( "dialog-ok" )) );
tmp->setText( str);
connect(tmp, SIGNAL(triggered(bool)), SLOT(slotSelectResource()));
actionSelectResource->addAction(tmp);
......
......@@ -117,7 +117,7 @@ QList<KAction*> *JabberGroupContact::customContextMenuActions ()
KAction *actionSetNick = new KAction(this);
actionSetNick->setText( i18n ("Change nickname") );
actionSetNick->setIcon( KIcon("jabber_changenick") );
actionSetNick->setIcon( KIcon( QLatin1String( "jabber_changenick" )) );
connect(actionSetNick, SIGNAL(triggered(bool)), this, SLOT(slotChangeNick()));
actionCollection->append( actionSetNick );
......
......@@ -434,7 +434,7 @@ void JabberProtocol::handleURL(const KUrl & kurl) const
if (!ok)
return;
}
if(action=="join" && url.hasQueryItem("password"))
if(action=="join" && url.hasQueryItem( QLatin1String( "password" )))
account->client()->joinGroupChat( jid.host() , jid.user() , nick, url.queryItemValue("password") );
else
account->client()->joinGroupChat( jid.host() , jid.user() , nick );
......
......@@ -71,7 +71,7 @@ static QString nameToString(const QByteArray &in)
parts += QString::fromUtf8(in.mid(at, len));
at += len;
}
return parts.join(".");
return parts.join( QLatin1String( "." ));
}
static QString recordToDesc(const QDnsSd::Record &rec)
......
......@@ -1073,7 +1073,7 @@ void Client::addExtension(const QString& ext, const Features& features)
{
if (!ext.isEmpty()) {
d->extension_features[ext] = features;
d->capsExt = extensions().join(" ");
d->capsExt = extensions().join( QLatin1String( " " ));
}
}
......@@ -1081,7 +1081,7 @@ void Client::removeExtension(const QString& ext)
{
if (d->extension_features.contains(ext)) {
d->extension_features.remove(ext);
d->capsExt = extensions().join(" ");
d->capsExt = extensions().join( QLatin1String( " " ));
}
}
......
......@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app;
KGlobal::locale()->insertCatalog("libkdegames");
KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));
if (app.isSessionRestored())
{
......
......@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app;
KGlobal::locale()->insertCatalog("libkdegames");
KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));
if (app.isSessionRestored())
{
RESTORE(KsirkSkinEditor::MainWindow);
......
Markdown is supported
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