Fwd: kmessagebox patch

Nicolas Goutte nicolasg at snafu.de
Sat Apr 15 07:37:29 BST 2006


On Saturday 15 April 2006 08:21, Waldo Bastian wrote:
> ----------  Forwarded Message  ----------
>
> Subject: kmessagebox patch
> Date: Friday 14 April 2006 09:40
> From: thorsten at staerk.de
> To: bastian at kde.org
>
> Hallo Waldo,
>
> ich habe da mal einen kleinen patch für kmessagebox geschrieben, den ich
> für meine Apps brauche:
>
> Index: kdeui/kmessagebox.cpp
> ===================================================================
> --- kdeui/kmessagebox.cpp       (revision 529556)
> +++ kdeui/kmessagebox.cpp       (working copy)
> @@ -631,7 +631,9 @@
>                               const QString &caption,
>                               const KGuiItem &buttonContinue,
>                               const QString &dontAskAgainName,
> -                             Options options)
> +                             Options options,

> +                            const QString yeswhatsthis,
> +                            const QString nowhatsthis )

I suppose that the new parameters should not have all-lower-case names (or is 
this a new rule for KDE4?)

Also, I suppose that it should be const QString& and  not simply 
const QString .

>  {
>      if ( !shouldBeShownContinue(dontAskAgainName) )
>          return Continue;
> @@ -646,6 +648,8 @@
>      dialog->setButtonText( KDialog::No, KStdGuiItem::cancel().text() );
>      dialog->setDefaultButton( KDialog::Yes );
>      dialog->setEscapeButton( KDialog::No );
> +    dialog->setButtonWhatsThis(KDialog::Yes, yeswhatsthis );
> +    dialog->setButtonWhatsThis(KDialog::No, nowhatsthis);
>      if( options & PlainCaption )
>          dialog->setPlainCaption( caption );
>  #ifdef Q_WS_X11
> Index: kdeui/kmessagebox.h
> ===================================================================
> --- kdeui/kmessagebox.h (revision 529556)
> +++ kdeui/kmessagebox.h (working copy)
> @@ -439,7 +439,9 @@
>                           const QString &caption = QString(),
>                           const KGuiItem &buttonContinue =
> KStdGuiItem::cont(),
>                           const QString &dontAskAgainName = QString(),
> -                         Options options = Notify);
> +                         Options options = Notify,
> +                        const QString yeswhatsthis = QString(),
> +                        const QString nowhatsthis = QString() );
>
>   /**
>    * Display a Yes/No/Cancel "warning" dialog.
>
>
>
> den und ähnliche kann ich doch einchecken, oder ?
>
> danke
>
> Thorsten
>
> -------------------------------------------------------

Have a nice day!




More information about the kde-core-devel mailing list