Use qlatin1string

wilder-work
Montel Laurent 13 years ago
parent 69dffef99e
commit 5c85d3ac69
  1. 2
      aboutdata.cpp
  2. 18
      kmcommands.cpp
  3. 369
      kmmainwidget.cpp
  4. 24
      kmreadermainwin.cpp
  5. 6
      kmstartup.cpp
  6. 4
      mailserviceimpl.cpp
  7. 42
      searchdialog/searchwindow.cpp

@ -242,7 +242,7 @@ namespace KMail {
ki18n("Copyright © 1997–2013, KMail authors"), KLocalizedString(), ki18n("Copyright © 1997–2013, KMail authors"), KLocalizedString(),
"http://userbase.kde.org/KMail" ) "http://userbase.kde.org/KMail" )
{ {
setProgramIconName("kmail"); setProgramIconName(QLatin1String("kmail"));
using KMail::authors; using KMail::authors;
using KMail::credits; using KMail::credits;
const unsigned int numberAuthors( sizeof authors / sizeof *authors ); const unsigned int numberAuthors( sizeof authors / sizeof *authors );

@ -481,7 +481,7 @@ KMAddBookmarksCommand::KMAddBookmarksCommand( const KUrl &url, QWidget *parent )
KMCommand::Result KMAddBookmarksCommand::execute() KMCommand::Result KMAddBookmarksCommand::execute()
{ {
const QString filename = KStandardDirs::locateLocal( "data", QString::fromLatin1("konqueror/bookmarks.xml") ); const QString filename = KStandardDirs::locateLocal( "data", QString::fromLatin1("konqueror/bookmarks.xml") );
KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename, "konqueror" ); KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename, QLatin1String("konqueror") );
KBookmarkGroup group = bookManager->root(); KBookmarkGroup group = bookManager->root();
group.addBookmark( mUrl.path(), KUrl( mUrl ) ); group.addBookmark( mUrl.path(), KUrl( mUrl ) );
if( bookManager->save() ) { if( bookManager->save() ) {
@ -695,8 +695,8 @@ KMOpenMsgCommand::KMOpenMsgCommand( QWidget *parent, const KUrl & url,
KMCommand::Result KMOpenMsgCommand::execute() KMCommand::Result KMOpenMsgCommand::execute()
{ {
if ( mUrl.isEmpty() ) { if ( mUrl.isEmpty() ) {
mUrl = KFileDialog::getOpenUrl( KUrl( "kfiledialog:///OpenMessage" ), mUrl = KFileDialog::getOpenUrl( KUrl( QLatin1String("kfiledialog:///OpenMessage") ),
"message/rfc822 application/mbox", QLatin1String("message/rfc822 application/mbox"),
parentWidget(), i18n("Open Message") ); parentWidget(), i18n("Open Message") );
} }
if ( mUrl.isEmpty() ) { if ( mUrl.isEmpty() ) {
@ -722,7 +722,7 @@ void KMOpenMsgCommand::slotDataArrived( KIO::Job *, const QByteArray & data )
if ( data.isEmpty() ) if ( data.isEmpty() )
return; return;
mMsgString.append( data.data() ); mMsgString.append( QString::fromLatin1(data.data()) );
} }
void KMOpenMsgCommand::slotResult( KJob *job ) void KMOpenMsgCommand::slotResult( KJob *job )
@ -736,7 +736,7 @@ void KMOpenMsgCommand::slotResult( KJob *job )
else { else {
int startOfMessage = 0; int startOfMessage = 0;
if ( mMsgString.startsWith( QLatin1String( "From " ) ) ) { if ( mMsgString.startsWith( QLatin1String( "From " ) ) ) {
startOfMessage = mMsgString.indexOf( '\n' ); startOfMessage = mMsgString.indexOf( QLatin1Char('\n') );
if ( startOfMessage == -1 ) { if ( startOfMessage == -1 ) {
KMessageBox::sorry( parentWidget(), KMessageBox::sorry( parentWidget(),
i18n( "The file does not contain a message." ) ); i18n( "The file does not contain a message." ) );
@ -755,7 +755,7 @@ void KMOpenMsgCommand::slotResult( KJob *job )
} }
// check for multiple messages in the file // check for multiple messages in the file
bool multipleMessages = true; bool multipleMessages = true;
int endOfMessage = mMsgString.indexOf( "\nFrom " ); int endOfMessage = mMsgString.indexOf( QLatin1String("\nFrom ") );
if ( endOfMessage == -1 ) { if ( endOfMessage == -1 ) {
endOfMessage = mMsgString.length(); endOfMessage = mMsgString.length();
multipleMessages = false; multipleMessages = false;
@ -1007,7 +1007,7 @@ KMCommand::Result KMRedirectCommand::execute()
: MailCommon::RedirectDialog::SendLater; : MailCommon::RedirectDialog::SendLater;
MessageViewer::AutoQPointer<MailCommon::RedirectDialog> dlg( new MailCommon::RedirectDialog( sendMode, parentWidget() ) ); MessageViewer::AutoQPointer<MailCommon::RedirectDialog> dlg( new MailCommon::RedirectDialog( sendMode, parentWidget() ) );
dlg->setObjectName( "redirect" ); dlg->setObjectName( QLatin1String("redirect") );
if ( dlg->exec() == QDialog::Rejected || !dlg ) { if ( dlg->exec() == QDialog::Rejected || !dlg ) {
return Failed; return Failed;
} }
@ -1281,7 +1281,7 @@ KMCommand::Result KMFilterActionCommand::execute()
const int msgCountToFilter = mMsgListId.count(); const int msgCountToFilter = mMsgListId.count();
ProgressItem* progressItem = ProgressItem* progressItem =
ProgressManager::createProgressItem ( ProgressManager::createProgressItem (
"filter"+ProgressManager::getUniqueID(), QLatin1String("filter")+ProgressManager::getUniqueID(),
i18n( "Filtering messages" ) ); i18n( "Filtering messages" ) );
progressItem->setTotalItems( msgCountToFilter ); progressItem->setTotalItems( msgCountToFilter );
@ -1440,7 +1440,7 @@ KMCommand::Result KMMoveCommand::execute()
// TODO set SSL state according to source and destfolder connection? // TODO set SSL state according to source and destfolder connection?
Q_ASSERT( !mProgressItem ); Q_ASSERT( !mProgressItem );
mProgressItem = mProgressItem =
ProgressManager::createProgressItem ("move"+ProgressManager::getUniqueID(), ProgressManager::createProgressItem (QLatin1String("move")+ProgressManager::getUniqueID(),
mDestFolder.isValid() ? i18n( "Moving messages" ) : i18n( "Deleting messages" ) ); mDestFolder.isValid() ? i18n( "Moving messages" ) : i18n( "Deleting messages" ) );
mProgressItem->setUsesBusyIndicator( true ); mProgressItem->setUsesBusyIndicator( true );
connect( mProgressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), connect( mProgressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)),

File diff suppressed because it is too large Load Diff

@ -107,12 +107,12 @@ void KMReaderMainWin::initKMReaderMainWin()
{ {
setCentralWidget( mReaderWin ); setCentralWidget( mReaderWin );
setupAccel(); setupAccel();
setupGUI( Keys | StatusBar | Create, "kmreadermainwin.rc" ); setupGUI( Keys | StatusBar | Create, QLatin1String("kmreadermainwin.rc") );
mMsgActions->setupForwardingActionsList( this ); mMsgActions->setupForwardingActionsList( this );
applyMainWindowSettings( KMKernel::self()->config()->group( "Separate Reader Window" ) ); applyMainWindowSettings( KMKernel::self()->config()->group( "Separate Reader Window" ) );
if( ! mReaderWin->message().isValid() ) { if( ! mReaderWin->message().isValid() ) {
menuBar()->hide(); menuBar()->hide();
toolBar( "mainToolBar" )->hide(); toolBar( QLatin1String("mainToolBar") )->hide();
} }
connect( kmkernel, SIGNAL(configChanged()), connect( kmkernel, SIGNAL(configChanged()),
this, SLOT(slotConfigChanged()) ); this, SLOT(slotConfigChanged()) );
@ -157,7 +157,7 @@ void KMReaderMainWin::showMessage( const QString & encoding, const Akonadi::Item
mTrashAction->setEnabled( canChange ); mTrashAction->setEnabled( canChange );
menuBar()->show(); menuBar()->show();
toolBar( "mainToolBar" )->show(); toolBar( QLatin1String("mainToolBar") )->show();
} }
void KMReaderMainWin::showMessage( const QString& encoding, KMime::Message::Ptr message ) void KMReaderMainWin::showMessage( const QString& encoding, KMime::Message::Ptr message )
@ -180,7 +180,7 @@ void KMReaderMainWin::showMessage( const QString& encoding, KMime::Message::Ptr
mTrashAction->setEnabled( false ); mTrashAction->setEnabled( false );
menuBar()->show(); menuBar()->show();
toolBar( "mainToolBar" )->show(); toolBar( QLatin1String("mainToolBar") )->show();
} }
@ -324,14 +324,14 @@ void KMReaderMainWin::setupAccel()
//----- File Menu //----- File Menu
mSaveAtmAction = new KAction(KIcon("mail-attachment"), i18n("Save A&ttachments..."), actionCollection() ); mSaveAtmAction = new KAction(KIcon(QLatin1String("mail-attachment")), i18n("Save A&ttachments..."), actionCollection() );
connect( mSaveAtmAction, SIGNAL(triggered(bool)), mReaderWin->viewer(), SLOT(slotAttachmentSaveAll()) ); connect( mSaveAtmAction, SIGNAL(triggered(bool)), mReaderWin->viewer(), SLOT(slotAttachmentSaveAll()) );
mTrashAction = new KAction( KIcon( "user-trash" ), i18n("&Move to Trash"), this ); mTrashAction = new KAction( KIcon( QLatin1String("user-trash") ), i18n("&Move to Trash"), this );
mTrashAction->setIconText( i18nc( "@action:intoolbar Move to Trash", "Trash" ) ); mTrashAction->setIconText( i18nc( "@action:intoolbar Move to Trash", "Trash" ) );
mTrashAction->setHelpText( i18n( "Move message to trashcan" ) ); mTrashAction->setHelpText( i18n( "Move message to trashcan" ) );
mTrashAction->setShortcut( QKeySequence( Qt::Key_Delete ) ); mTrashAction->setShortcut( QKeySequence( Qt::Key_Delete ) );
actionCollection()->addAction( "move_to_trash", mTrashAction ); actionCollection()->addAction( QLatin1String("move_to_trash"), mTrashAction );
connect( mTrashAction, SIGNAL(triggered()), this, SLOT(slotTrashMsg()) ); connect( mTrashAction, SIGNAL(triggered()), this, SLOT(slotTrashMsg()) );
KAction *closeAction = KStandardAction::close( this, SLOT(close()), actionCollection() ); KAction *closeAction = KStandardAction::close( this, SLOT(close()), actionCollection() );
@ -342,13 +342,13 @@ void KMReaderMainWin::setupAccel()
//----- Message Menu //----- Message Menu
mFontAction = new KFontAction( i18n("Select Font"), this ); mFontAction = new KFontAction( i18n("Select Font"), this );
actionCollection()->addAction( "text_font", mFontAction ); actionCollection()->addAction( QLatin1String("text_font"), mFontAction );
mFontAction->setFont( mReaderWin->cssHelper()->bodyFont().family() ); mFontAction->setFont( mReaderWin->cssHelper()->bodyFont().family() );
connect( mFontAction, SIGNAL(triggered(QString)), connect( mFontAction, SIGNAL(triggered(QString)),
SLOT(slotFontAction(QString)) ); SLOT(slotFontAction(QString)) );
mFontSizeAction = new KFontSizeAction( i18n( "Select Size" ), this ); mFontSizeAction = new KFontSizeAction( i18n( "Select Size" ), this );
mFontSizeAction->setFontSize( mReaderWin->cssHelper()->bodyFont().pointSize() ); mFontSizeAction->setFontSize( mReaderWin->cssHelper()->bodyFont().pointSize() );
actionCollection()->addAction( "text_size", mFontSizeAction ); actionCollection()->addAction( QLatin1String("text_size"), mFontSizeAction );
connect( mFontSizeAction, SIGNAL(fontSizeChanged(int)), connect( mFontSizeAction, SIGNAL(fontSizeChanged(int)),
SLOT(slotSizeAction(int)) ); SLOT(slotSizeAction(int)) );
@ -371,7 +371,7 @@ KAction *KMReaderMainWin::copyActionMenu(QMenu *menu)
if ( mainwin ) if ( mainwin )
{ {
KActionMenu *action = new KActionMenu( menu ); KActionMenu *action = new KActionMenu( menu );
action->setIcon( KIcon( "edit-copy") ); action->setIcon( KIcon( QLatin1String("edit-copy")) );
action->setText( i18n("Copy Item To...") ); action->setText( i18n("Copy Item To...") );
mainwin->standardMailActionManager()->standardActionManager()->createActionFolderMenu( action->menu(), Akonadi::StandardActionManager::CopyItemToMenu ); mainwin->standardMailActionManager()->standardActionManager()->createActionFolderMenu( action->menu(), Akonadi::StandardActionManager::CopyItemToMenu );
connect( action->menu(), SIGNAL(triggered(QAction*)), SLOT(slotCopyItem(QAction*)) ); connect( action->menu(), SIGNAL(triggered(QAction*)), SLOT(slotCopyItem(QAction*)) );
@ -413,7 +413,7 @@ void KMReaderMainWin::slotMessagePopup(const Akonadi::Item&aMsg , const KUrl&aUr
mMsg = aMsg; mMsg = aMsg;
const QString email = KPIMUtils::firstEmailAddress( aUrl.path() ).toLower(); const QString email = KPIMUtils::firstEmailAddress( aUrl.path() ).toLower();
if ( aUrl.protocol() == "mailto" && !email.isEmpty()) { if ( aUrl.protocol() == QLatin1String("mailto") && !email.isEmpty()) {
Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob( this ); Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob( this );
job->setLimit( 1 ); job->setLimit( 1 );
job->setQuery( Akonadi::ContactSearchJob::Email, email, Akonadi::ContactSearchJob::ExactMatch ); job->setQuery( Akonadi::ContactSearchJob::Email, email, Akonadi::ContactSearchJob::ExactMatch );
@ -604,7 +604,7 @@ void KMReaderMainWin::slotEditToolbars()
void KMReaderMainWin::slotUpdateToolbars() void KMReaderMainWin::slotUpdateToolbars()
{ {
createGUI("kmreadermainwin.rc"); createGUI(QLatin1String("kmreadermainwin.rc"));
applyMainWindowSettings( KConfigGroup(KMKernel::self()->config(), "ReaderWindow") ); applyMainWindowSettings( KConfigGroup(KMKernel::self()->config(), "ReaderWindow") );
} }

@ -69,7 +69,7 @@ void checkConfigUpdates() {
return; return;
for ( int i = configUpdateLevel ; i < numUpdates ; ++i ) { for ( int i = configUpdateLevel ; i < numUpdates ; ++i ) {
config->checkUpdate( updates[i], "kmail.upd" ); config->checkUpdate( QLatin1String(updates[i]), QLatin1String("kmail.upd") );
} }
GlobalSettings::self()->setUpdateLevel( numUpdates ); GlobalSettings::self()->setUpdateLevel( numUpdates );
} }
@ -102,8 +102,8 @@ void insertLibraryCataloguesAndIcons() {
KLocale * l = KGlobal::locale(); KLocale * l = KGlobal::locale();
KIconLoader * il = KIconLoader::global(); KIconLoader * il = KIconLoader::global();
for ( unsigned int i = 0 ; i < sizeof catalogs / sizeof *catalogs ; ++i ) { for ( unsigned int i = 0 ; i < sizeof catalogs / sizeof *catalogs ; ++i ) {
l->insertCatalog( catalogs[i] ); l->insertCatalog( QLatin1String(catalogs[i]) );
il->addAppDir( catalogs[i] ); il->addAppDir( QLatin1String(catalogs[i]) );
} }
} }

@ -48,7 +48,7 @@ namespace KMail {
MailServiceImpl::MailServiceImpl() MailServiceImpl::MailServiceImpl()
{ {
new ServiceAdaptor( this ); new ServiceAdaptor( this );
QDBusConnection::sessionBus().registerObject( "/MailTransportService", this ); QDBusConnection::sessionBus().registerObject( QLatin1String("/MailTransportService"), this );
} }
bool MailServiceImpl::sendMessage( const QString& from, const QString& to, bool MailServiceImpl::sendMessage( const QString& from, const QString& to,
@ -79,7 +79,7 @@ bool MailServiceImpl::sendMessage( const QString& from, const QString& to,
attachUrls += KUrl( attachments[i] ); attachUrls += KUrl( attachments[i] );
} }
cWin->addAttachmentsAndSend( attachUrls, "", 1 );//send now cWin->addAttachmentsAndSend( attachUrls, QString(), 1 );//send now
return true; return true;
} }

@ -99,7 +99,7 @@ SearchWindow::SearchWindow( KMMainWidget *widget, const Akonadi::Collection &col
mUi.setupUi( searchWidget ); mUi.setupUi( searchWidget );
setButtons( None ); setButtons( None );
mStartSearchGuiItem = KGuiItem( i18nc( "@action:button Search for messages", "&Search" ), "edit-find" ); mStartSearchGuiItem = KGuiItem( i18nc( "@action:button Search for messages", "&Search" ), QLatin1String("edit-find") );
mStopSearchGuiItem = KStandardGuiItem::stop(); mStopSearchGuiItem = KStandardGuiItem::stop();
mSearchButton = mUi.mButtonBox->addButton( mStartSearchGuiItem, QDialogButtonBox::ActionRole ); mSearchButton = mUi.mButtonBox->addButton( mStartSearchGuiItem, QDialogButtonBox::ActionRole );
connect( mUi.mButtonBox, SIGNAL(rejected()), SLOT(slotClose()) ); connect( mUi.mButtonBox, SIGNAL(rejected()), SLOT(slotClose()) );
@ -216,7 +216,7 @@ SearchWindow::SearchWindow( KMMainWidget *widget, const Akonadi::Collection &col
connect( this, SIGNAL(closeClicked()),this,SLOT(slotClose()) ); connect( this, SIGNAL(closeClicked()),this,SLOT(slotClose()) );
// give focus to the value field of the first search rule // give focus to the value field of the first search rule
RegExpLineEdit* r = mUi.mPatternEdit->findChild<RegExpLineEdit*>( "regExpLineEdit" ); RegExpLineEdit* r = mUi.mPatternEdit->findChild<RegExpLineEdit*>( QLatin1String("regExpLineEdit") );
if ( r ) if ( r )
r->setFocus(); r->setFocus();
else else
@ -224,30 +224,30 @@ SearchWindow::SearchWindow( KMMainWidget *widget, const Akonadi::Collection &col
//set up actions //set up actions
KActionCollection *ac = actionCollection(); KActionCollection *ac = actionCollection();
mReplyAction = new KAction( KIcon( "mail-reply-sender" ), i18n( "&Reply..." ), this ); mReplyAction = new KAction( KIcon( QLatin1String("mail-reply-sender") ), i18n( "&Reply..." ), this );
actionCollection()->addAction( "search_reply", mReplyAction ); actionCollection()->addAction( QLatin1String("search_reply"), mReplyAction );
connect( mReplyAction, SIGNAL(triggered(bool)), SLOT(slotReplyToMsg()) ); connect( mReplyAction, SIGNAL(triggered(bool)), SLOT(slotReplyToMsg()) );
mReplyAllAction = new KAction( KIcon( "mail-reply-all" ), i18n( "Reply to &All..." ), this ); mReplyAllAction = new KAction( KIcon( QLatin1String("mail-reply-all") ), i18n( "Reply to &All..." ), this );
actionCollection()->addAction( "search_reply_all", mReplyAllAction ); actionCollection()->addAction( QLatin1String("search_reply_all"), mReplyAllAction );
connect( mReplyAllAction, SIGNAL(triggered(bool)), SLOT(slotReplyAllToMsg()) ); connect( mReplyAllAction, SIGNAL(triggered(bool)), SLOT(slotReplyAllToMsg()) );
mReplyListAction = new KAction( KIcon( "mail-reply-list" ), i18n( "Reply to Mailing-&List..." ), this ); mReplyListAction = new KAction( KIcon( QLatin1String("mail-reply-list") ), i18n( "Reply to Mailing-&List..." ), this );
actionCollection()->addAction( "search_reply_list", mReplyListAction ); actionCollection()->addAction(QLatin1String( "search_reply_list"), mReplyListAction );
connect( mReplyListAction, SIGNAL(triggered(bool)), SLOT(slotReplyListToMsg()) ); connect( mReplyListAction, SIGNAL(triggered(bool)), SLOT(slotReplyListToMsg()) );
mForwardActionMenu = new KActionMenu( KIcon( "mail-forward" ), i18nc( "Message->", "&Forward" ), this ); mForwardActionMenu = new KActionMenu( KIcon( QLatin1String("mail-forward") ), i18nc( "Message->", "&Forward" ), this );
actionCollection()->addAction( "search_message_forward", mForwardActionMenu ); actionCollection()->addAction( QLatin1String("search_message_forward"), mForwardActionMenu );
connect( mForwardActionMenu, SIGNAL(triggered(bool)), this, SLOT(slotForwardMsg()) ); connect( mForwardActionMenu, SIGNAL(triggered(bool)), this, SLOT(slotForwardMsg()) );
mForwardInlineAction = new KAction( KIcon( "mail-forward" ), mForwardInlineAction = new KAction( KIcon( QLatin1String("mail-forward") ),
i18nc( "@action:inmenu Forward message inline.", "&Inline..." ), i18nc( "@action:inmenu Forward message inline.", "&Inline..." ),
this ); this );
actionCollection()->addAction( "search_message_forward_inline", mForwardInlineAction ); actionCollection()->addAction( QLatin1String("search_message_forward_inline"), mForwardInlineAction );
connect( mForwardInlineAction, SIGNAL(triggered(bool)), SLOT(slotForwardMsg()) ); connect( mForwardInlineAction, SIGNAL(triggered(bool)), SLOT(slotForwardMsg()) );
mForwardAttachedAction = new KAction( KIcon( "mail-forward" ), i18nc( "Message->Forward->", "As &Attachment..." ), this ); mForwardAttachedAction = new KAction( KIcon( QLatin1String("mail-forward") ), i18nc( "Message->Forward->", "As &Attachment..." ), this );
actionCollection()->addAction( "search_message_forward_as_attachment", mForwardAttachedAction ); actionCollection()->addAction( QLatin1String("search_message_forward_as_attachment"), mForwardAttachedAction );
connect( mForwardAttachedAction, SIGNAL(triggered(bool)), SLOT(slotForwardAttachedMsg()) ); connect( mForwardAttachedAction, SIGNAL(triggered(bool)), SLOT(slotForwardAttachedMsg()) );
if ( GlobalSettings::self()->forwardingInlineByDefault() ) { if ( GlobalSettings::self()->forwardingInlineByDefault() ) {
@ -258,16 +258,16 @@ SearchWindow::SearchWindow( KMMainWidget *widget, const Akonadi::Collection &col
mForwardActionMenu->addAction( mForwardInlineAction ); mForwardActionMenu->addAction( mForwardInlineAction );
} }
mSaveAsAction = actionCollection()->addAction( KStandardAction::SaveAs, "search_file_save_as", this, SLOT(slotSaveMsg()) ); mSaveAsAction = actionCollection()->addAction( KStandardAction::SaveAs, QLatin1String("search_file_save_as"), this, SLOT(slotSaveMsg()) );
mSaveAtchAction = new KAction( KIcon( "mail-attachment" ), i18n( "Save Attachments..." ), this ); mSaveAtchAction = new KAction( KIcon( QLatin1String("mail-attachment") ), i18n( "Save Attachments..." ), this );
actionCollection()->addAction( "search_save_attachments", mSaveAtchAction ); actionCollection()->addAction( QLatin1String("search_save_attachments"), mSaveAtchAction );
connect( mSaveAtchAction, SIGNAL(triggered(bool)), SLOT(slotSaveAttachments()) ); connect( mSaveAtchAction, SIGNAL(triggered(bool)), SLOT(slotSaveAttachments()) );
mPrintAction = actionCollection()->addAction( KStandardAction::Print, "search_print", this, SLOT(slotPrintMsg()) ); mPrintAction = actionCollection()->addAction( KStandardAction::Print, QLatin1String("search_print"), this, SLOT(slotPrintMsg()) );
mClearAction = new KAction( i18n( "Clear Selection" ), this ); mClearAction = new KAction( i18n( "Clear Selection" ), this );
actionCollection()->addAction( "search_clear_selection", mClearAction ); actionCollection()->addAction( QLatin1String("search_clear_selection"), mClearAction );
connect( mClearAction, SIGNAL(triggered(bool)), SLOT(slotClearSelection()) ); connect( mClearAction, SIGNAL(triggered(bool)), SLOT(slotClearSelection()) );
connect( mUi.mCbxFolders, SIGNAL(folderChanged(Akonadi::Collection)), connect( mUi.mCbxFolders, SIGNAL(folderChanged(Akonadi::Collection)),
@ -415,10 +415,10 @@ void SearchWindow::slotSearch()
#ifdef AKONADI_USE_STRIGI_SEARCH #ifdef AKONADI_USE_STRIGI_SEARCH
const QString query = searchPattern.asXesamQuery(); const QString query = searchPattern.asXesamQuery();
const QString queryLanguage = "XESAM"; const QString queryLanguage = QLatin1String("XESAM");
#else #else
const QString query = searchPattern.asSparqlQuery(urls); const QString query = searchPattern.asSparqlQuery(urls);
const QString queryLanguage = "SPARQL"; const QString queryLanguage = QLatin1String("SPARQL");
#endif #endif
qDebug() << queryLanguage; qDebug() << queryLanguage;

Loading…
Cancel
Save