Commit 0c9fa0fa authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: message dialog, use the update button and fix the build

parent f7c5ce41
...@@ -112,9 +112,6 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) ...@@ -112,9 +112,6 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
pldebugTree->headerItem()->setText( 4, "Item flags" ); pldebugTree->headerItem()->setText( 4, "Item flags" );
pldebugTree->setColumnCount( 5 ); pldebugTree->setColumnCount( 5 );
pldebugTabLayout->addWidget( pldebugTree ); pldebugTabLayout->addWidget( pldebugTree );
QPushButton *pldebugUpdateButton = new QPushButton( "Update" );
pldebugTabLayout->addWidget( pldebugUpdateButton );
BUTTONACT( pldebugUpdateButton, updatePLTree() );
#endif #endif
tabChanged(0); tabChanged(0);
...@@ -320,14 +317,18 @@ void MessagesDialog::updateOrClear() ...@@ -320,14 +317,18 @@ void MessagesDialog::updateOrClear()
ui.modulesTree->clear(); ui.modulesTree->clear();
buildTree( NULL, VLC_OBJECT( p_intf->p_libvlc ) ); buildTree( NULL, VLC_OBJECT( p_intf->p_libvlc ) );
} }
else else if( ui.mainTab->currentIndex() == 0 )
ui.messages->clear(); ui.messages->clear();
#ifndef NDEBUG
else
updatePLTree();
#endif
} }
void MessagesDialog::tabChanged( int i ) void MessagesDialog::tabChanged( int i )
{ {
updateButton->setIcon( i == 1 ? QIcon(":/update") : QIcon(":/toolbar/clear") ); updateButton->setIcon( i != 0 ? QIcon(":/update") : QIcon(":/toolbar/clear") );
updateButton->setToolTip( i == 1 ? qtr("Update the tree") updateButton->setToolTip( i != 0 ? qtr("Update the tree")
: qtr("Clear the messages") ); : qtr("Clear the messages") );
} }
......
...@@ -67,9 +67,6 @@ private slots: ...@@ -67,9 +67,6 @@ private slots:
void updateOrClear(); void updateOrClear();
void tabChanged( int ); void tabChanged( int );
void filterMessages(); void filterMessages();
#ifndef NDEBUG
void updatePLTree();
#endif
private: private:
void buildTree( QTreeWidgetItem *, vlc_object_t * ); void buildTree( QTreeWidgetItem *, vlc_object_t * );
...@@ -79,6 +76,7 @@ private: ...@@ -79,6 +76,7 @@ private:
QMutex messageLocker; QMutex messageLocker;
#ifndef NDEBUG #ifndef NDEBUG
QTreeWidget *pldebugTree; QTreeWidget *pldebugTree;
void updatePLTree();
#endif #endif
}; };
......
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