fix:remove custom treeview class

This commit is contained in:
Xiao YiFang 2023-04-12 20:26:57 +08:00 committed by xiaoyifang
parent ddb9655938
commit e32a7a2c94
7 changed files with 5 additions and 43 deletions

View file

@ -410,8 +410,6 @@ set(PROJECT_SOURCES
translatebox.hh
transliteration.cc
transliteration.hh
treeview.cc
treeview.hh
ufile.cc
ufile.hh
utf8.cc

View file

@ -21,7 +21,7 @@
void FavoritesPaneWidget::setUp( Config::Class * cfg, QMenu * menu )
{
m_cfg = cfg;
m_favoritesTree = findChild< TreeView * >( "favoritesTree" );
m_favoritesTree = findChild< QTreeView * >( "favoritesTree" );
QDockWidget * favoritesPane = qobject_cast< QDockWidget * >( parentWidget() );
m_favoritesTree->setHeaderHidden( true );

View file

@ -13,10 +13,11 @@
#include <QDomNode>
#include <QList>
#include <QMimeData>
#include <QItemSelection>
#include <QTreeView>
#include <config.hh>
#include "delegate.hh"
#include "treeview.hh"
class FavoritesModel;
@ -78,7 +79,7 @@ private:
virtual bool eventFilter( QObject *, QEvent * );
Config::Class * m_cfg ;
TreeView * m_favoritesTree;
QTreeView * m_favoritesTree;
QMenu * m_favoritesMenu;
QAction * m_deleteSelectedAction;
QAction * m_separator;

View file

@ -404,7 +404,6 @@ HEADERS += folding.hh \
gls.hh \
splitfile.hh \
favoritespanewidget.hh \
treeview.hh \
src/dict/lingualibre.h \
src/ui/articleview.h \
src/ui/ftssearchpanel.h \
@ -540,7 +539,6 @@ SOURCES += folding.cc \
gls.cc \
splitfile.cc \
favoritespanewidget.cc \
treeview.cc \
src/dict/lingualibre.cpp \
src/ui/articleview.cpp \
src/ui/ftssearchpanel.cpp \

View file

@ -252,7 +252,7 @@
<number>1</number>
</property>
<item>
<widget class="TreeView" name="favoritesTree"/>
<widget class="QTreeView" name="favoritesTree"/>
</item>
</layout>
</widget>
@ -624,11 +624,6 @@
<header>favoritespanewidget.hh</header>
<container>1</container>
</customwidget>
<customwidget>
<class>TreeView</class>
<extends>QTreeView</extends>
<header>treeview.hh</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>translateLine</tabstop>

View file

@ -1,10 +0,0 @@
/* This file is (c) 2008-2018 Abs62
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#include <QDropEvent>
#include "treeview.hh"
void TreeView::dropEvent( QDropEvent * event )
{
QTreeView::dropEvent( event );
}

View file

@ -1,20 +0,0 @@
/* This file is (c) 2008-2018 Abs62
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#ifndef __TREEVIEW_HH__INCLUDED
#define __TREEVIEW_HH__INCLUDED
#include <QTreeView>
class TreeView : public QTreeView
{
public:
TreeView( QWidget * parent = 0 ) :
QTreeView( parent )
{}
protected:
virtual void dropEvent( QDropEvent * event );
};
#endif // TREEVIEW_HH