construct KGuiItem(QString) explicitly

svn path=/trunk/KDE/kdebase/kdepasswd/; revision=583808
This commit is contained in:
Will Entriken 2006-09-13 15:05:55 +00:00
parent ed57ae7120
commit bd2a34800e
13 changed files with 26 additions and 25 deletions

View file

@ -112,8 +112,8 @@ bool KDEpasswd2Dialog::checkPassword(const char *password)
"the password to 8 characters, or leave it as it is.")
,
i18n("Password Too Long"),
i18n("Truncate"),
i18n("Use as Is"),
KGuiItem(i18n("Truncate")),
KGuiItem(i18n("Use as Is")),
"truncatePassword"))
{
case KMessageBox::Yes :

View file

@ -75,7 +75,7 @@ ImportCommand* ImportCommand::performImport(const QString &type, QWidget *top) {
KMessageBox::questionYesNoCancel(
top, i18n("Import as a new subfolder or replace all the current bookmarks?"),
i18n("%1 Import", importer->visibleName()),
i18n("As New Folder"), i18n("Replace"));
KGuiItem(i18n("As New Folder")), KGuiItem(i18n("Replace")));
if (answer == KMessageBox::Cancel) {
delete importer;

View file

@ -498,7 +498,7 @@ void KonqAboutPage::urlSelected( const QString &url, int button, int state, cons
if ( KMessageBox::questionYesNo( widget(),
i18n("Do you want to disable showing "
"the introduction in the webbrowsing profile?"),
i18n("Faster Startup?"),i18n("Disable"),i18n("Keep") )
i18n("Faster Startup?"),KGuiItem(i18n("Disable")),KGuiItem(i18n("Keep")) )
== KMessageBox::Yes )
{
QString profile = KStandardDirs::locateLocal("data", "konqueror/profiles/webbrowsing");

View file

@ -221,7 +221,7 @@ KonqKfmIconView::KonqKfmIconView( QWidget *parentWidget, QObject *parent, const
m_pamPreview = new KActionMenu( i18n( "&Preview" ), actionCollection(), "iconview_preview" );
m_paEnablePreviews = new KToggleAction( i18n("Enable Previews"), actionCollection(), "iconview_preview_all" );
m_paEnablePreviews->setCheckedState( i18n("Disable Previews") );
m_paEnablePreviews->setCheckedState( KGuiItem(i18n("Disable Previews")) );
connect( m_paEnablePreviews, SIGNAL( toggled( bool ) ), this, SLOT( slotPreview( bool ) ) );
m_paEnablePreviews->setIcon(KIcon("thumbnail"));
m_pamPreview->addAction( m_paEnablePreviews );

View file

@ -194,7 +194,7 @@ ToggleViewGUIClient::ToggleViewGUIClient( KonqMainWindow *mainWindow )
QString name = (*cIt)->desktopEntryName();
//kDebug(1202) << "ToggleViewGUIClient: name=" << name << endl;
KToggleAction *action = new KToggleAction( description, mainWindow->actionCollection(), name.toLatin1() );
action->setCheckedState( i18n( "Hide %1" , (*cIt)->name() ) );
action->setCheckedState( KGuiItem(i18n( "Hide %1" , (*cIt)->name() )) );
// HACK
if ( (*cIt)->icon() != "unknown" )

View file

@ -5324,7 +5324,7 @@ void KonqMainWindow::slotAddWebSideBar(const KUrl& url, const QString& name)
int rc = KMessageBox::questionYesNo(0,
i18n("Add new web extension \"%1\" to your sidebar?",
name.isEmpty() ? name : url.prettyUrl()),
i18n("Web Sidebar"),i18n("Add"),i18n("Do Not Add"));
i18n("Web Sidebar"),KGuiItem(i18n("Add")),KGuiItem(i18n("Do Not Add")));
if (rc == KMessageBox::Yes) {
// Show the sidebar

View file

@ -1329,7 +1329,7 @@ bool KonqView::prepareReload( KParts::URLArgs& args )
if ( KMessageBox::warningContinueCancel( 0, i18n(
"The page you are trying to view is the result of posted form data. "
"If you resend the data, any action the form carried out (such as search or online purchase) will be repeated. "),
i18n( "Warning" ), i18n( "Resend" ) ) == KMessageBox::Continue )
i18n( "Warning" ), KGuiItem(i18n( "Resend" )) ) == KMessageBox::Continue )
{
args.setDoPost( true );
args.setContentType( m_postContentType );

View file

@ -1140,7 +1140,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
i18n("You have multiple tabs open in this window.\n"
"Loading a view profile will close them."),
i18n("Confirmation"),
i18n("Load View Profile"),
KGuiItem(i18n("Load View Profile")),
"LoadProfileTabsConfirm" ) == KMessageBox::Cancel )
return;
}
@ -1155,7 +1155,8 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
showTab( view );
if ( KMessageBox::warningContinueCancel( 0,
i18n("This tab contains changes that have not been submitted.\nLoading a profile will discard these changes."),
i18n("Discard Changes?"), i18n("&Discard Changes"), "discardchangesloadprofile") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes")), "discardchangesloadprofile") != KMessageBox::Continue )
/* WE: maybe KStdGuiItem(Discard) here? */
{
showTab( originalView );
return;
@ -1173,7 +1174,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
if (prop.isValid() && prop.toBool())
if ( KMessageBox::warningContinueCancel( 0,
i18n("This page contains changes that have not been submitted.\nLoading a profile will discard these changes."),
i18n("Discard Changes?"), i18n("&Discard Changes"), "discardchangesloadprofile") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes")), "discardchangesloadprofile") != KMessageBox::Continue )
return;
}
}

View file

@ -653,34 +653,34 @@ void KonqListView::setupActions()
{
m_paShowTime = new KToggleAction(i18n("Show &Modification Time"), actionCollection(), "show_time" );
connect(m_paShowTime, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowTime->setCheckedState(i18n("Hide &Modification Time"));
m_paShowTime->setCheckedState(KGuiItem(i18n("Hide &Modification Time")));
m_paShowType = new KToggleAction(i18n("Show &File Type"), actionCollection(), "show_type" );
connect(m_paShowType, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowType->setCheckedState(i18n("Hide &File Type"));
m_paShowType->setCheckedState(KGuiItem(i18n("Hide &File Type")));
m_paShowMimeType = new KToggleAction(i18n("Show MimeType"), actionCollection(), "show_mimetype" );
connect(m_paShowMimeType, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowMimeType->setCheckedState(i18n("Hide MimeType"));
m_paShowMimeType->setCheckedState(KGuiItem(i18n("Hide MimeType")));
m_paShowAccessTime = new KToggleAction(i18n("Show &Access Time"), actionCollection(), "show_access_time" );
connect(m_paShowAccessTime, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowAccessTime->setCheckedState(i18n("Hide &Access Time"));
m_paShowAccessTime->setCheckedState(KGuiItem(i18n("Hide &Access Time")));
m_paShowCreateTime = new KToggleAction(i18n("Show &Creation Time"), actionCollection(), "show_creation_time" );
connect(m_paShowCreateTime, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowCreateTime->setCheckedState(i18n("Hide &Creation Time"));
m_paShowCreateTime->setCheckedState(KGuiItem(i18n("Hide &Creation Time")));
m_paShowLinkDest = new KToggleAction(i18n("Show &Link Destination"), actionCollection(), "show_link_dest" );
connect(m_paShowLinkDest, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowLinkDest->setCheckedState(i18n("Hide &Link Destination"));
m_paShowLinkDest->setCheckedState(KGuiItem(i18n("Hide &Link Destination")));
m_paShowSize = new KToggleAction(i18n("Show Filesize"), actionCollection(), "show_size" );
connect(m_paShowSize, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowSize->setCheckedState(i18n("Hide Filesize"));
m_paShowSize->setCheckedState(KGuiItem(i18n("Hide Filesize")));
m_paShowOwner = new KToggleAction(i18n("Show Owner"), actionCollection(), "show_owner" );
connect(m_paShowOwner, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowOwner->setCheckedState(i18n("Hide Owner"));
m_paShowOwner->setCheckedState(KGuiItem(i18n("Hide Owner")));
m_paShowGroup = new KToggleAction(i18n("Show Group"), actionCollection(), "show_group" );
connect(m_paShowGroup, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowGroup->setCheckedState(i18n("Hide Group"));
m_paShowGroup->setCheckedState(KGuiItem(i18n("Hide Group")));
m_paShowPermissions = new KToggleAction(i18n("Show Permissions"), actionCollection(), "show_permissions" );
connect(m_paShowPermissions, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));
m_paShowPermissions->setCheckedState(i18n("Hide Permissions"));
m_paShowPermissions->setCheckedState(KGuiItem(i18n("Hide Permissions")));
m_paShowURL = new KToggleAction(i18n("Show URL"), actionCollection(), "show_url" );
connect(m_paShowURL, SIGNAL(triggered(bool) ), SLOT(slotColumnToggled()));

View file

@ -179,7 +179,7 @@ bool KCookiesPolicies::handleDuplicate( const QString& domain, int advice )
"Do you want to replace it?</qt>", domain);
int res = KMessageBox::warningContinueCancel(this, msg,
i18n("Duplicate Policy"),
i18n("Replace"));
KGuiItem(i18n("Replace")));
if ( res == KMessageBox::Continue )
{
m_pDomainPolicy[item]= KCookieAdvice::adviceToStr(advice);

View file

@ -233,7 +233,7 @@ bool UserAgentDlg::handleDuplicate( const QString& site,
"</qt>", site);
int res = KMessageBox::warningContinueCancel(this, msg,
i18n("Duplicate Identification"),
i18n("Replace"));
KGuiItem(i18n("Replace")));
if ( res == KMessageBox::Continue )
{
item->setText(0, site);

View file

@ -267,7 +267,7 @@ bool DesktopPathConfig::moveDir( const KUrl & src, const KUrl & dest, const QStr
m_ok = true;
// Ask for confirmation before moving the files
if ( KMessageBox::questionYesNo( this, i18n("The path for '%1' has been changed;\ndo you want the files to be moved from '%2' to '%3'?",
type, src.path(), dest.path()), i18n("Confirmation Required"),i18n("Move"),KStdGuiItem::cancel() )
type, src.path(), dest.path()), i18n("Confirmation Required"),KGuiItem(i18n("Move")),KStdGuiItem::cancel() )
== KMessageBox::Yes )
{
bool destExists = QFile::exists(dest.path());

View file

@ -189,7 +189,7 @@ void KWrite::setupActions()
m_paShowPath = new KToggleAction( i18n("Sho&w Path"), actionCollection(), "set_showPath" );
connect( m_paShowPath, SIGNAL(triggered()), this, SLOT(documentNameChanged()) );
m_paShowPath->setCheckedState(i18n("Hide Path"));
m_paShowPath->setCheckedState(KGuiItem(i18n("Hide Path")));
m_paShowPath->setWhatsThis(i18n("Show the complete document path in the window caption"));
a=KStdAction::keyBindings(this, SLOT(editKeys()), actionCollection());
a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments."));