[vlc-devel] [PATCH 4/6] qt4: rename a couple of methods to be more explicit
Ludovic Fauvet
etix at videolan.org
Fri Jun 8 22:33:05 CEST 2012
---
modules/gui/qt4/dialogs/bookmarks.cpp | 4 ++--
modules/gui/qt4/dialogs/epg.cpp | 4 ++--
modules/gui/qt4/dialogs/help.cpp | 4 ++--
modules/gui/qt4/dialogs/mediainfo.cpp | 4 ++--
modules/gui/qt4/dialogs/messages.cpp | 4 ++--
modules/gui/qt4/dialogs/plugins.cpp | 8 ++++----
modules/gui/qt4/util/qvlcframe.hpp | 4 ++--
7 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/modules/gui/qt4/dialogs/bookmarks.cpp b/modules/gui/qt4/dialogs/bookmarks.cpp
index 8b6ba9d..e026201 100644
--- a/modules/gui/qt4/dialogs/bookmarks.cpp
+++ b/modules/gui/qt4/dialogs/bookmarks.cpp
@@ -94,13 +94,13 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf ):QVLCFrame( _p_intf )
#endif
CONNECT( buttonsBox, rejected(), this, close() );
- readSettings( "Bookmarks", QSize( 435, 280 ) );
+ restoreWidgetPosition( "Bookmarks", QSize( 435, 280 ) );
updateGeometry();
}
BookmarksDialog::~BookmarksDialog()
{
- writeSettings( "Bookmarks" );
+ saveWidgetPosition( "Bookmarks" );
}
void BookmarksDialog::update()
diff --git a/modules/gui/qt4/dialogs/epg.cpp b/modules/gui/qt4/dialogs/epg.cpp
index 1613f37..58266f3 100644
--- a/modules/gui/qt4/dialogs/epg.cpp
+++ b/modules/gui/qt4/dialogs/epg.cpp
@@ -96,12 +96,12 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
CONNECT( timer, timeout(), this, updateInfos() );
updateInfos();
- readSettings( "EPGDialog", QSize( 650, 450 ) );
+ restoreWidgetPosition( "EPGDialog", QSize( 650, 450 ) );
}
EpgDialog::~EpgDialog()
{
- writeSettings( "EPGDialog" );
+ saveWidgetPosition( "EPGDialog" );
}
void EpgDialog::displayEvent( EPGItem *epgItem )
diff --git a/modules/gui/qt4/dialogs/help.cpp b/modules/gui/qt4/dialogs/help.cpp
index da515b8..af5ad5f 100644
--- a/modules/gui/qt4/dialogs/help.cpp
+++ b/modules/gui/qt4/dialogs/help.cpp
@@ -70,12 +70,12 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
layout->addWidget( closeButtonBox );
CONNECT( closeButtonBox, rejected(), this, close() );
- readSettings( "Help", QSize( 500, 450 ) );
+ restoreWidgetPosition( "Help", QSize( 500, 450 ) );
}
HelpDialog::~HelpDialog()
{
- writeSettings( "Help" );
+ saveWidgetPosition( "Help" );
}
AboutDialog::AboutDialog( intf_thread_t *_p_intf)
diff --git a/modules/gui/qt4/dialogs/mediainfo.cpp b/modules/gui/qt4/dialogs/mediainfo.cpp
index 2f06c5b..854140f 100644
--- a/modules/gui/qt4/dialogs/mediainfo.cpp
+++ b/modules/gui/qt4/dialogs/mediainfo.cpp
@@ -125,12 +125,12 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
if( p_item )
updateAllTabs( p_item );
- readSettings( "Mediainfo", QSize( 600 , 480 ) );
+ restoreWidgetPosition( "Mediainfo", QSize( 600 , 480 ) );
}
MediaInfoDialog::~MediaInfoDialog()
{
- writeSettings( "Mediainfo" );
+ saveWidgetPosition( "Mediainfo" );
}
void MediaInfoDialog::showTab( int i_tab = 0 )
diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index e5ae1bb..9fbcc9f 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -114,7 +114,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
CONNECT( ui.mainTab, currentChanged( int ), this, tabChanged( int ) );
/* General action */
- readSettings( "Messages", QSize( 600, 450 ) );
+ restoreWidgetPosition( "Messages", QSize( 600, 450 ) );
/* Hook up to LibVLC messaging */
vlc_Subscribe( &sub, MsgCallback, this );
@@ -122,7 +122,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
MessagesDialog::~MessagesDialog()
{
- writeSettings( "Messages" );
+ saveWidgetPosition( "Messages" );
vlc_Unsubscribe( &sub );
};
diff --git a/modules/gui/qt4/dialogs/plugins.cpp b/modules/gui/qt4/dialogs/plugins.cpp
index 1fcae46..4d84ec9 100644
--- a/modules/gui/qt4/dialogs/plugins.cpp
+++ b/modules/gui/qt4/dialogs/plugins.cpp
@@ -75,12 +75,12 @@ PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
box->addButton( okButton, QDialogButtonBox::RejectRole );
layout->addWidget( box );
BUTTONACT( okButton, close() );
- readSettings( "PluginsDialog", QSize( 435, 280 ) );
+ restoreWidgetPosition( "PluginsDialog", QSize( 435, 280 ) );
}
PluginDialog::~PluginDialog()
{
- writeSettings( "PluginsDialog" );
+ saveWidgetPosition( "PluginsDialog" );
}
/* Plugins tab */
@@ -125,7 +125,7 @@ PluginTab::PluginTab( intf_thread_t *p_intf_ )
this, search( const QString& ) );
setMinimumSize( 500, 300 );
- readSettings( "Plugins", QSize( 540, 400 ) );
+ restoreWidgetPosition( "Plugins", QSize( 540, 400 ) );
}
inline void PluginTab::FillTree()
@@ -164,7 +164,7 @@ void PluginTab::search( const QString& qs )
PluginTab::~PluginTab()
{
- writeSettings( "Plugins" );
+ saveWidgetPosition( "Plugins" );
getSettings()->setValue( "Plugins/Header-State",
treePlugins->header()->saveState() );
}
diff --git a/modules/gui/qt4/util/qvlcframe.hpp b/modules/gui/qt4/util/qvlcframe.hpp
index 832a5bd..2747a4a 100644
--- a/modules/gui/qt4/util/qvlcframe.hpp
+++ b/modules/gui/qt4/util/qvlcframe.hpp
@@ -113,14 +113,14 @@ public:
protected:
intf_thread_t *p_intf;
- void readSettings( const QString& name,
+ void restoreWidgetPosition( const QString& name,
QSize defSize = QSize( 1, 1 ),
QPoint defPos = QPoint( 0, 0 ) )
{
QVLCTools::restoreWidgetPosition(p_intf, name, this, defSize, defPos);
}
- void writeSettings( const QString& name )
+ void saveWidgetPosition( const QString& name )
{
QVLCTools::saveWidgetPosition( p_intf, name, this);
}
--
1.7.10.3
More information about the vlc-devel
mailing list