diff --git a/addons/tabswitcher/tabswitchertreeview.h b/addons/tabswitcher/tabswitchertreeview.h --- a/addons/tabswitcher/tabswitchertreeview.h +++ b/addons/tabswitcher/tabswitchertreeview.h @@ -37,11 +37,11 @@ */ TabSwitcherTreeView(); - int sizeHintWidth() const; - /** - * todo: see inside + * Sum of the widths of both columns */ + int sizeHintWidth() const; + void resizeColumnsToContents(); Q_SIGNALS: @@ -65,7 +65,7 @@ void keyPressEvent(QKeyEvent * event) override; /** - * Reimplemented for adjusting the column widths (todo: does not work yet) + * Reimplemented for adjusting the column widths to fit the contents */ void showEvent(QShowEvent *event) override; }; diff --git a/addons/tabswitcher/tabswitchertreeview.cpp b/addons/tabswitcher/tabswitchertreeview.cpp --- a/addons/tabswitcher/tabswitchertreeview.cpp +++ b/addons/tabswitcher/tabswitchertreeview.cpp @@ -45,8 +45,6 @@ void TabSwitcherTreeView::resizeColumnsToContents() { - // TODO: does not work properly (or at all?) - qDebug() << "resizeColumnsToContents()"; resizeColumnToContents(0); resizeColumnToContents(1); } diff --git a/addons/tabswitcher/tests/CMakeLists.txt b/addons/tabswitcher/tests/CMakeLists.txt --- a/addons/tabswitcher/tests/CMakeLists.txt +++ b/addons/tabswitcher/tests/CMakeLists.txt @@ -10,7 +10,6 @@ find_package(Qt5Widgets CONFIG REQUIRED) set(SRC - main.cpp tstestapp.cpp ../tabswitcherfilesmodel.cpp ) diff --git a/addons/tabswitcher/tests/main.cpp b/addons/tabswitcher/tests/main.cpp deleted file mode 100644 --- a/addons/tabswitcher/tests/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "tstestapp.h" -#include - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - TsTestApp w; - w.show(); - - return app.exec(); -} diff --git a/addons/tabswitcher/tests/tstestapp.cpp b/addons/tabswitcher/tests/tstestapp.cpp --- a/addons/tabswitcher/tests/tstestapp.cpp +++ b/addons/tabswitcher/tests/tstestapp.cpp @@ -1,6 +1,7 @@ #include "tstestapp.h" #include "../tabswitcherfilesmodel.h" +#include #include #include #include @@ -110,3 +111,12 @@ TsTestApp::~TsTestApp() { } + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + TsTestApp w; + w.show(); + + return app.exec(); +}