Commit 09f433f9 authored by Alexander Semke's avatar Alexander Semke

Show the backend icons in the worksheet tabs.

parent d208a000
......@@ -274,9 +274,25 @@ void CantorShell::addWorksheet(const QString& backendName)
if (part)
connect(part, SIGNAL(setWindowCaption(const QString&)), this, SLOT(setTabCaption(const QString&)));
int tab = m_tabWidget->addTab(part->widget(), i18n("Session %1", sessionCount++));
//determine the icon of the backend to be added
Cantor::Backend* backend = nullptr;
for (Cantor::Backend* b : Cantor::Backend::availableBackends())
if (b->name() == backendName)
backend = b;
int tab = -1;
if (backend)
tab = m_tabWidget->addTab(part->widget(), QIcon::fromTheme(backend->icon()), i18n("Session %1", sessionCount++));
else //should never happend but just in case we still have some bugs somewhere...
tab = m_tabWidget->addTab(part->widget(), i18n("Session %1", sessionCount++));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment