summaryrefslogtreecommitdiffstats
path: root/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp')
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp
index 2914630..77e9152 100755
--- a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp
@@ -1,8 +1,7 @@
#include <unistd.h>
#include "misc_settings.h"
#include "mv_common.h"
-//Added by qt3to4:
-#include <Q3TextStream>
+//#include <QTextStream>
#include "mythuihelper.h"
#include "mythsystemlegacy.h"
@@ -121,7 +120,7 @@ QString MiscMainFrame::mf_show_tz(QString tz)
{
QString GTimezone;
int rc;
- bool showLabels;
+ //bool showLabels;
if (autoLaunchTimer->isActive())
{
autoLaunchTimer->stop();
@@ -153,19 +152,19 @@ QString MiscMainFrame::mf_show_tz(QString tz)
QFile file("/tmp/.selected_tz");
if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
{
- Q3TextStream t( &file ); // use a text stream
- while ( !t.eof() )
+ QTextStream t( &file ); // use a text stream
+ while ( !t.atEnd() )
{
line = t.readLine();
if ( line.contains("/"))
{
- GTimezone = line.simplifyWhiteSpace();
+ GTimezone = line.simplified();
break;
}
}
file.close();
}
- timezone_unknown = FALSE;
+ timezone_unknown = false;
emit update_timezone(GTimezone);
}
@@ -224,11 +223,14 @@ QStringList findFilesRecursively ( QStringList paths, QString fileTypes ) {
{ // inefficient...whatever
QDir dir( paths[i] );
dir.setSorting( QDir::Reversed );
- more = dir.entryList( fileTypes, QDir::Files );
+ dir.setFilter( QDir::Files );
+ dir.setNameFilters( QStringList()<<fileTypes );
+ more = dir.entryList();
for ( it = more.begin() ; it != more.end() ; ++it )
result.append( paths[i] + "/" + *it );
+ dir.setFilter( QDir::Dirs | QDir::NoDotAndDotDot );
// reg exp in next line excludes . and .. dirs (and .* actually)
- more = dir.entryList( QDir::Dirs ).grep( QRegExp( "[^.]" ) );
+ more = dir.entryList();
for ( it = more.begin() ; it != more.end() ; ++it )
*it = paths[i] + "/" + *it;
more = findFilesRecursively( more, fileTypes );