]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/complete_preferences.cpp
Do not include vlc_modules.h in vlc_common.h
[vlc] / modules / gui / qt4 / components / complete_preferences.cpp
index dd1471682d9d47fbfbe013aa857bb3658dc9a441..1892f8e0e1ecc1ab195c90609e8399e896b81080 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <vlc_config_cat.h>
 #include <vlc_intf_strings.h>
+#include <vlc_modules.h>
 #include <assert.h>
 
 #define ITEM_HEIGHT 25
@@ -53,9 +54,8 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
                             QTreeWidget( _parent ), p_intf( _p_intf )
 {
     /* General Qt options */
-    setColumnCount( 1 );
     setAlternatingRowColors( true );
-    header()->hide();
+    setHeaderHidden( true );
 
     setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) );
     setTextElideMode( Qt::ElideNone );
@@ -125,7 +125,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
             current_item = new QTreeWidgetItem();
             current_item->setText( 0, data->name );
             current_item->setIcon( 0 , icon );
-            current_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
+            //current_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
             current_item->setData( 0, Qt::UserRole,
                                    qVariantFromValue( data ) );
             addTopLevelItem( current_item );
@@ -177,7 +177,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
             subcat_item->setText( 0, data_sub->name );
             subcat_item->setData( 0, Qt::UserRole,
                                   qVariantFromValue( data_sub ) );
-            subcat_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
+            //subcat_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
 
             /* Add it to the parent */
             assert( current_item );
@@ -271,7 +271,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
         module_item->setText( 0, qtr( module_get_name( p_module, false ) ) );
         module_item->setData( 0, Qt::UserRole,
                               QVariant::fromValue( module_data) );
-        module_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
+        //module_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
         subcat_item->addChild( module_item );
     }
 
@@ -279,6 +279,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
     sortItems( 0, Qt::AscendingOrder );
 
     module_list_free( p_list );
+    resizeColumnToContents( 0 );
 }
 
 PrefsTree::~PrefsTree() {}
@@ -404,7 +405,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
     }
 
     QLabel *titleLabel = new QLabel( head );
-    QFont titleFont = QApplication::font( static_cast<QWidget*>(0) );
+    QFont titleFont = QApplication::font();
     titleFont.setPointSize( titleFont.pointSize() + 6 );
     titleLabel->setFont( titleFont );