# HG changeset patch # User Teemu Piippo # Date 1487871156 -7200 # Node ID a426a335e5866cbb0d5d25a20e9892755ad841a2 # Parent ef475e07482e2d645f07560386ff571682d3d32c Some cleanup in mainwindow.cpp, use QSet for the 'ignore' variable. diff -r ef475e07482e -r a426a335e586 src/mainwindow.cpp --- a/src/mainwindow.cpp Thu Feb 23 18:47:15 2017 +0200 +++ b/src/mainwindow.cpp Thu Feb 23 19:32:36 2017 +0200 @@ -71,11 +71,7 @@ m_tabs->setTabsClosable (true); ui.verticalLayout->insertWidget (0, m_tabs); createBlankDocument(); - print("Setting current widget..."); - GLRenderer* renderer_ = getRendererForDocument(m_currentDocument); - print("Choosing: %1", renderer_); - ui.rendererStack->setCurrentWidget(renderer_); - print("Set: %1", renderer()); + ui.rendererStack->setCurrentWidget(getRendererForDocument(m_currentDocument)); connect (ui.objectList, SIGNAL (itemSelectionChanged()), this, SLOT (selectionChanged())); connect (ui.objectList, SIGNAL (itemDoubleClicked (QListWidgetItem*)), this, @@ -113,11 +109,11 @@ // Examine the toolsets and make a dictionary of tools m_toolsets = Toolset::createToolsets (this); - QStringList ignore; + QSet ignore; for (int i = 0; i < Toolset::staticMetaObject.methodCount(); ++i) { QMetaMethod method = Toolset::staticMetaObject.method (i); - ignore.append (QString::fromUtf8 (method.name())); + ignore.insert(QString::fromUtf8(method.name())); } for (Toolset* toolset : m_toolsets)