Requesting interface change for KDirOperator
Peter Penz
peter.penz at gmx.at
Sat Sep 1 13:06:50 BST 2007
Hello,
as discussed on kfm-devel at
http://lists.kde.org/?l=kfm-devel&m=118857084210266&w=2 the current
file-dialog still uses the classes K3FileIconView and K3FileDetailView
classes based on the deprecated Q3...View classes. This is not only a problem
from a maintenance point of view for us developers, but also implies a
different look and feel of the views in the file-dialog compared to Konqueror
and Dolphin.
Today I ported the class KDirOperator to use Qt4's interview classes (using
KDirModel, KFileItemDelegate etc.). Unfortunately this porting was not
possible without minor interface changes and I wanted to ask for a "OK" to
commit those changes on this Monday.
The changes in KDirOperator are:
* public interfaces:
- KFileView* view() const;
+ QAbstractItemView* view() const;
- void setView(KFileView *view);
+ void setView(QAbstractItemView * view);
- const KFileItemList* selectedItems() const;
+ QList<KFileItem> selectedItems() const;
* protected interfaces:
- KFileView* createView(QWidget *parent, KFile::FileView view);
+ QAbstractItemView* createView(QWidget *parent, KFile::FileView view);
We checked the usage of KDirOperator by
http://lxr.kde.org/ident?i=KDirOperator and the effort for adapting the other
classes. The good news is that those changed interfaces are very, very rarely
used and the only changes that have to be done are in:
- KDE/kdesdk/kate/filebrowser/katefileselector.cpp (around 5 lines must be
changed)
- extragear/graphics/kuickshow/src/filewidget.cpp (one line must be changed)
For sure I'd do those changes if I get the OK for this patch.
Please note that I'm aware that we have a freeze and I also started this quite
annoying porting task not just for fun. But IMO this is not a "nice-to-have"
cleanup task but mandatory for:
- having a common look and feel for the filedialog with Konqueror and Dolphin
- reduce the maintenance effort for the file-dialog for future releases
- to allow KDE4 developers using Qt4's interview classes in the scope of
KDirOperator
Please let me know if I can commit the interface changes this Monday.
Thanks!
Peter
More information about the kde-core-devel
mailing list