[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdeui/actions
From:       David Faure <faure () kde ! org>
Date:       2008-03-01 1:17:11
Message-ID: 200803010217.12513.faure () kde ! org
[Download RAW message or body]

On Saturday 01 March 2008, Michael Jansen wrote:
> --- trunk/KDE/kdelibs/kdeui/actions/kaction.h #780777:780778
> @@ -256,6 +256,19 @@
> virtual ~KAction();
> 
> /**
> +     * Differs the shortcut from the default setting?
> +     *
> +     * @return yes/no

Please add @since 4.1

> +     */
> +    //@{
> +    inline bool isModified() const {
> +        return isLocalShortcutModified() || isGlobalShortcutModified();
> +    }
> +    bool isLocalShortcutModified() const;
> +    bool isGlobalShortcutModified() const;
> +    //@}


> +void KActionCollection::readGlobalSettings( KConfigGroup* config )
> +{
> +  Q_ASSERT(config);
> +  if (!config) {
> +    return;
> +  }
> +
> +  if( !config || !config->exists()) {
> +    return;
> +  }

You test for !config twice.

> --- trunk/KDE/kdelibs/kdeui/actions/kactioncollection.h #780777:780778
> @@ -145,8 +145,25 @@
> * in the group set by setConfigGroup().
> */
> void readSettings( KConfigGroup* config = 0 );
> +  
> +  /**
> +    * Read from @p config all configurable global key associations.
> +    *
> +    * \param config Config object to read from
> +    */
> +  void readGlobalSettings( KConfigGroup* config );

@since 4.1

Maybe readGlobalShortcuts? "global settings" doesn't convey the information
that this is about shortcuts...

> /**
> +    * Write the current configurable global key associations to @p config.
> +    *
> +    * \param config Config object to save to
> +    * \param writeDefaults set to true to write settings which are already at \
> defaults. +    * \param oneAction pass an action here if you just want to save the \
> values for one action, eg. +    *                  if you know that action is the \
> only one which has changed. +    */
> +  void writeGlobalSettings( KConfigGroup* config = 0, bool writeDefaults = false, \
> QAction* oneAction = 0 ) const;

@since 4.1
writeGlobalShortcuts?
Why does config have a default value of 0? This seems wrong, since the code doesn't \
want it to be 0.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic