Review Request 116684: Improve API in KCompletionBase

David Gil Oliva davidgiloliva at gmail.com
Wed Mar 12 23:06:06 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116684/
-----------------------------------------------------------

(Updated March 12, 2014, 11:06 p.m.)


Review request for KDE Frameworks.


Changes
-------

Change include to header, following Kévin's advice.


Repository: kcompletion


Description
-------

Improve API in KCompletionBase

getKeyBindings -> keyBindingMap
getKeyBinding -> keyBinding

NOTICE: The following part is commented out because it gives me errors and I need some help to find out what actually happens:

    /**
     * @deprecated since 5.0, use keyBindingMap instead
     */
#ifndef KDE_NO_DEPRECATED
    KCOMPLETION_DEPRECATED KeyBindingMap getKeyBindings() const
    {
        return keyBindingMap();
    }
#endif

Error:

In file included from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.cpp:21:0:
/home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.h: In member function ‘KCompletionBase::KeyBindingMap KCompletionBase::getKeyBindings() const’:
/home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.h:336:5: error: return type ‘KCompletionBase::KeyBindingMap {aka class QMap<KCompletionBase::KeyBindingType, QList<QKeySequence> >}’ is incomplete
/home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.h:337:30: error: invalid use of incomplete type ‘KCompletionBase::KeyBindingMap {aka class QMap<KCompletionBase::KeyBindingType, QList<QKeySequence> >}’
In file included from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qvarlengtharray.h:45:0,
                 from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qmetatype.h:48,
                 from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qobject.h:56,
                 from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/QObject:1,
                 from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletion.h:25,
                 from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.h:23,
                 from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.cpp:21:
/opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qcontainerfwd.h:54:37: error: declaration of ‘KCompletionBase::KeyBindingMap {aka class QMap<KCompletionBase::KeyBindingType, QList<QKeySequence> >}’
In file included from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcombobox.h:27:0,
                 from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcombobox.cpp:23:
/home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.h: In member function ‘KCompletionBase::KeyBindingMap KCompletionBase::getKeyBindings() const’:
/home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.h:336:5: error: return type ‘KCompletionBase::KeyBindingMap {aka class QMap<KCompletionBase::KeyBindingType, QList<QKeySequence> >}’ is incomplete
/home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletionbase.h:337:30: error: invalid use of incomplete type ‘KCompletionBase::KeyBindingMap {aka class QMap<KCompletionBase::KeyBindingType, QList<QKeySequence> >}’
In file included from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qvarlengtharray.h:45:0,
                 from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qmetatype.h:48,
                 from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qobject.h:56,
                 from /opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/QObject:1,
                 from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcompletion.h:25,
                 from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcombobox.h:25,
                 from /home/david/devel/kf5-development/frameworks/kcompletion/src/kcombobox.cpp:23:
/opt/Qt5.2.0-KF5/5.2.0/gcc/include/QtCore/qcontainerfwd.h:54:37: error: declaration of ‘KCompletionBase::KeyBindingMap {aka class QMap<KCompletionBase::KeyBindingType, QList<QKeySequence> >}’
make[2]: *** [src/CMakeFiles/KF5Completion.dir/kcompletionbase.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....


Diffs (updated)
-----

  src/kcompletionbase.h 1dedd2d 
  src/kcompletionbase.cpp 1e251d1 
  src/klineedit.cpp ae15093 

Diff: https://git.reviewboard.kde.org/r/116684/diff/


Testing
-------

It compiles and (auto)tests pass without the conflicting part (to be uncommented).


Thanks,

David Gil Oliva

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140312/ff8f7d80/attachment.html>


More information about the Kde-frameworks-devel mailing list