diff options
Diffstat (limited to 'abs/core/mythinstall')
25 files changed, 323 insertions, 485 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp index cfd7fb3..c0c859f 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp @@ -17,7 +17,7 @@ void AutoCard::popup_menu(void) QString uniqid = name.section(' ', -1); QString description = name.section('*',-3,-3); description = description.section('.',1); - description = description.stripWhiteSpace(); + description = description.simplified(); // //cout << uniqid << endl; // //cout << "descriptn" << endl; // //cout << description << endl; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h index bc2c4cb..5f6825f 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h @@ -27,7 +27,7 @@ protected: virtual ~ImageSelectSetting(); protected: - vector<QImage*> images; + std::vector<QImage*> images; QWidget *bxwidget; QLabel *imagelabel; MythComboBox *combo; @@ -40,4 +40,4 @@ class MPUBLIC HostImageSelect : public ImageSelectSetting, public HostDBStorage public: HostImageSelect(const QString &name) : ImageSelectSetting(this), HostDBStorage(this, name) { } -};
\ No newline at end of file +}; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp index 58804a5..d09efd7 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp @@ -1,9 +1,8 @@ #include <unistd.h> #include "misc_settings.h" #include "mv_common.h" -//Added by qt3to4: -#include <Q3TextStream> +#include <QTextStream> #include <unistd.h> #include <stdio.h> #include <QtNetwork> @@ -190,8 +189,8 @@ static HostComboBox *HostServiceSamba_domain() QFile file("/tmp/smbdomainlist"); 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.startsWith("domain")) diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp index cd56683..ae53011 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp @@ -1,7 +1,7 @@ #include <unistd.h> #include <stdlib.h> #include "infrared.h" -#include <Q3TextStream> +#include <QTextStream> using namespace std; @@ -36,7 +36,7 @@ HostRemoteTypeIR_favorites::HostRemoteTypeIR_favorites(): { continue; } - QImage* previewImage = new QImage(preview_global.absFilePath()); + QImage* previewImage = new QImage(preview_global.absoluteFilePath()); addImageSelection(remote.fileName(), previewImage); } }; @@ -71,7 +71,7 @@ HostRemoteTypeIR_other::HostRemoteTypeIR_other(): { continue; } - QImage* previewImage = new QImage(preview_global.absFilePath()); + QImage* previewImage = new QImage(preview_global.absoluteFilePath()); addImageSelection(remote.fileName(), previewImage); } }; @@ -107,7 +107,7 @@ HostRemoteTypeIR_hauppauge::HostRemoteTypeIR_hauppauge(): { continue; } - QImage* previewImage = new QImage(preview_global.absFilePath()); + QImage* previewImage = new QImage(preview_global.absoluteFilePath()); addImageSelection(remote.fileName(), previewImage); } }; @@ -144,7 +144,7 @@ HostRemoteTypeIR_ATI::HostRemoteTypeIR_ATI(): { continue; } - QImage* previewImage = new QImage(preview_global.absFilePath()); + QImage* previewImage = new QImage(preview_global.absoluteFilePath()); addImageSelection(remote.fileName(), previewImage); } }; @@ -182,12 +182,12 @@ HostRemoteTypeIR_user::HostRemoteTypeIR_user(): { continue; } - QImage* previewImage = new QImage(preview_global.absFilePath()); + QImage* previewImage = new QImage(preview_global.absoluteFilePath()); addImageSelection(remote.fileName(), previewImage); count++; } QFileInfo preview_global(previewpath); - QImage* previewImage = new QImage(preview_global.absFilePath()); + QImage* previewImage = new QImage(preview_global.absoluteFilePath()); if ( count == 0 ) addImageSelection("none found", previewImage); @@ -253,8 +253,8 @@ static HostComboBox *HostHDHRlirc_device() 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.startsWith("hdhomerun device")) diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp index 80bd5d5..96866dc 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp @@ -1,13 +1,11 @@ #include <mythcontext.h> #include <unistd.h> #include "installationtype.h" -//Added by qt3to4: -#include <Q3TextStream> +#include <QTextStream> #include <qdir.h> #include "mv_common.h" - int mythinstalltype (QString tmp_install_drive) { @@ -94,21 +92,25 @@ static HostSpinBox *HOSTSWAPsize() QFile file("/proc/meminfo"); if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) { - Q3TextStream t( &file ); // use a text stream + QTextStream t( &file ); // use a text stream line = t.readLine(); if ( line.startsWith("MemTotal:")) { - currentitem = line.simplifyWhiteSpace(); + currentitem = line.simplified(); currentitem = currentitem.section( " ", 1, 1 ); } } file.close(); bool ok; int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE + //QTextStream(stdout) << mem << endl; mem = mem/1024 ; + //QTextStream(stdout) << mem << endl; + if ( ! ok ) - mem = 120 ; - HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 128, 128000, 128, true); + mem = 257 ; + //QTextStream(stdout) << mem << endl; + HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 256, 256000, 256, true); gc->setLabel(QObject::tr("Swapspace size (MB)")); gc->setValue(mem); gc->setHelpText(QObject::tr("Amount of space allocated for the swap partition." )); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp index e18da49..1724da7 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp @@ -1,12 +1,11 @@ #include <qapplication.h> -//Added by qt3to4: -#include <Q3TextStream> +#include <QTextStream> #include <unistd.h> #include <fstream> #include "mythcontext.h" //#include "tv.h" -#include "uitypes.h" +//#include "uitypes.h" #include "installdialog.h" #include "installsettings.h" #include "installationtype.h" @@ -100,7 +99,7 @@ bool WelcomeDialog::Create(void) void WelcomeDialog::shutdownNow(int rc) { QString NETBOOT = getenv("NETBOOT"); - NETBOOT=NETBOOT.stripWhiteSpace(); + NETBOOT=NETBOOT.simplified(); // system("rm -f /tmp/.install_state"); // system("rm -f /tmp/.install_percent"); // system("rm -f /tmp/.install_error"); @@ -118,7 +117,8 @@ void WelcomeDialog::runLIVECD(void) QString PAINTER = gCoreContext->GetSetting("ThemePainter"); QString SERVERIP = gCoreContext->GetSetting("HostMysqlServer"); QString startFECmd = ("MYTHCONFDIR=/tmp mythfrontend -O ThemePainter=" + PAINTER + " -O AudioOutputDevice=ALSA:default -O MasterServerIP=" + SERVERIP ); - myth_system(startFECmd.ascii()); +// myth_system(startFECmd.ascii()); + myth_system(startFECmd); } else { @@ -156,8 +156,10 @@ bool WelcomeDialog::keyPressEvent(QKeyEvent *event) QString cmd = gCoreContext->GetSetting("MythShutdownXTermCmd", ""); if (!cmd.isEmpty()) { - QByteArray tmp = cmd.toAscii(); - system(tmp); +// QByteArray tmp = cmd.toAscii(); +// QByteArray tmp = cmd; +// system(tmp); + system(qPrintable(cmd)); } } else @@ -203,13 +205,13 @@ void WelcomeDialog::updateTime(void) QFile file(releasefile); if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) { - Q3TextStream t( &file ); // use a text stream + QTextStream t( &file ); // use a text stream distro_line = t.readLine(); file.close(); } QString s=""; s.append(distro_line); - s.append( "\nMythtv source:" ); + s.append( "\nMythTV Branch: " ); //s.append(MYTH_SOURCE_VERSION); //s.append(" "); s.append(MYTH_SOURCE_PATH); @@ -227,7 +229,7 @@ void WelcomeDialog::updateScreen(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh " ); - system(cmdtxt); + system(qPrintable(cmdtxt)); recording_text=" "; mythvantage_text=" "; error_text=" "; @@ -238,21 +240,21 @@ void WelcomeDialog::updateScreen(void) QFile mylog("/tmp/mythvantage_install.log"); if ( mystatus.open(QIODevice::ReadOnly | QIODevice::Text) ) { - Q3TextStream t( &mystatus ); // use a text stream + QTextStream t( &mystatus ); // use a text stream scheduled_text = t.readLine(); mystatus.close(); } if ( mypercent.open(QIODevice::ReadOnly | QIODevice::Text) ) { - Q3TextStream t( &mypercent ); // use a text stream + QTextStream t( &mypercent ); // use a text stream recording_text = t.readLine(); mypercent.close(); } if ( myerror.open(QIODevice::ReadOnly | QIODevice::Text) ) { - Q3TextStream t( &myerror ); // use a text stream + QTextStream t( &myerror ); // use a text stream error_text = t.readLine(); myerror.close(); scheduled_text = error_text; @@ -264,7 +266,7 @@ void WelcomeDialog::updateScreen(void) { if ( mylog.open( QIODevice::ReadOnly| QIODevice::Text ) ) { - Q3TextStream t( &mylog ); + QTextStream t( &mylog ); while ( !t.atEnd() ) { mythvantage_text=t.readLine(); @@ -282,7 +284,8 @@ void WelcomeDialog::updateScreen(void) install_text = ""; m_status_text->SetText(install_text ); - m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL, true); +// m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL, true); + m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL); if ( scheduled_text == "Done" ) { Reboot_popup () ; @@ -530,7 +533,8 @@ QString WelcomeDialog::findinstallsouce(void) { int ndx = line.find(" "); currentitem =QString::fromStdString(line.substr(0,ndx)); - ndx = currentitem.findRev("/"); +// ndx = currentitem.findRev("/"); + ndx = currentitem.lastIndexOf("/"); currentitem = currentitem.mid(ndx+1,3); return currentitem; }; @@ -555,7 +559,7 @@ void WelcomeDialog::showPopup_2(void) bool installsource = false; QString NETBOOT = getenv("NETBOOT"); - NETBOOT=NETBOOT.stripWhiteSpace(); + NETBOOT=NETBOOT.simplified(); if ( NETBOOT == "YES" ) m_menuPopup->AddButton(("Diskless Frontend " ), SLOT(install_net() ) ); @@ -611,9 +615,8 @@ void WelcomeDialog::showPopup_2(void) void WelcomeDialog::GO_popup(QString go_text) { DialogCode retval = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(), - QString("Start the process"), - QObject::tr(go_text), - QObject::tr("Start the process"), QObject::tr("Cancel"), kDialogCodeButton0); + "", go_text, tr("Start the process"), + tr("Cancel"), kDialogCodeButton0); if ( retval == kDialogCodeButton0 ) { @@ -783,7 +786,7 @@ void WelcomeDialog::write_install_conf(QString rootdisk) sqlsize=sqlsize + "000"; QFile f( "/etc/install_layout" ); - if( !f.open( IO_WriteOnly ) ) + if( !f.open( QIODevice::WriteOnly | QIODevice::Text ) ) std::cout << "Failed to open file /etc/install_layout." << std::endl; QTextStream myfile( &f ); @@ -859,7 +862,7 @@ void WelcomeDialog::install_generic(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh find_update " + install_drive +" &"); - system(cmdtxt); + system(qPrintable(cmdtxt)); busy_find_oldsettings(); bool flag = false; QString line; @@ -867,8 +870,8 @@ void WelcomeDialog::install_generic(void) QFile file("/etc/systemconfig"); 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.startsWith("hostname")) @@ -888,8 +891,8 @@ void WelcomeDialog::install_generic(void) QFile file("/tmp/etc/LinHES-release"); 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("8.") ) @@ -992,14 +995,14 @@ int WelcomeDialog::ask_validate_network(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh network_check_it setup_network &"); - retval = system(cmdtxt); + retval = system(qPrintable(cmdtxt)); busy_network(); if (network_check) { network_check->setProgress(2); cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh network_check_it check_self"); - retval = system(cmdtxt); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1012,7 +1015,7 @@ int WelcomeDialog::ask_validate_network(void) network_check->setProgress(3); cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh network_check_it check_gw"); - retval = system(cmdtxt); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1025,7 +1028,7 @@ int WelcomeDialog::ask_validate_network(void) network_check->setProgress(4); cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh network_check_it check_ns"); - retval = system(cmdtxt); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1038,7 +1041,7 @@ int WelcomeDialog::ask_validate_network(void) network_check->setProgress(5); cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh network_check_it check_names"); - retval = system(cmdtxt); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1051,7 +1054,7 @@ int WelcomeDialog::ask_validate_network(void) network_check->setProgress(6); cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh network_check_it host_names"); - retval = system(cmdtxt); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1068,7 +1071,12 @@ int WelcomeDialog::ask_validate_network(void) if (retval != 0 ) { - DialogCode val = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(), QString(""), QObject::tr(pop_text), QObject::tr("Continue"), QObject::tr("Try again"), kDialogCodeButton0); + DialogCode val = MythPopupBox::Show2ButtonPopup( + GetMythMainWindow(), + "", pop_text, + tr("Continue"), + tr("Try again"), + kDialogCodeButton0); if (kDialogCodeButton0 == val ) retval = 0; } @@ -1118,17 +1126,17 @@ void WelcomeDialog::install_it(void) QFile file("/proc/meminfo"); if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) { - Q3TextStream t( &file ); // use a text stream + QTextStream t( &file ); // use a text stream line = t.readLine(); if ( line.startsWith("MemTotal:")) { - currentitem = line.simplifyWhiteSpace(); + currentitem = line.simplified(); currentitem = currentitem.section( " ", 1, 1 ); } } file.close(); - bool ok; - int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE +// bool ok; +// int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE // if ( mem >= 500000 ) @@ -1141,14 +1149,14 @@ void WelcomeDialog::install_it(void) QString cmdtxt=MV_ROOT ; //cmdtxt.append("bin/install_proxy.sh full_install_it " + install_drive + " " + rootfs + " " + rootsize + " " + datafs + " " + datasize + " " + swapsize + "&"); cmdtxt.append("bin/install_proxy.sh full_install_it &"); - system(cmdtxt); + system(qPrintable(cmdtxt)); } else if ( installtype == "Upgrade" ) { QString cmdtxt=MV_ROOT ; //cmdtxt.append("bin/install_proxy.sh upgrade_it " + install_drive + " " + uprootfs + "&"); cmdtxt.append("bin/install_proxy.sh upgrade_it &"); - system(cmdtxt); + system(qPrintable(cmdtxt)); } else if (installtype=="NET") { @@ -1165,11 +1173,11 @@ void WelcomeDialog::install_it(void) QString h; h=localhostname; cmdtxt.append("bin/restore_default_settings.sh -c save -t syssettings -d 127.0.0.1 -h " + h); - system(cmdtxt); + system(qPrintable(cmdtxt)); cmdtxt=MV_ROOT ; //cmdtxt.append("bin/install_proxy.sh NETBOOT " + install_drive + " &"); cmdtxt.append("bin/install_proxy.sh NETBOOT &"); - system(cmdtxt); + system(qPrintable(cmdtxt)); } WORKING_ON_INSTALL = true; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h index 9d54c39..432ea19 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h @@ -2,7 +2,6 @@ #define WELCOMEDIALOG_H_ #include <iostream> -//Added by qt3to4: #include <QKeyEvent> using namespace std; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp index 05acc5e..aa599ee 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp @@ -4,8 +4,7 @@ #include <QtNetwork> -//Added by qt3to4: -#include <Q3TextStream> +#include <QTextStream> //#include "tv.h" #include <stdlib.h> #include "mythprogressdialog.h" @@ -21,7 +20,7 @@ -int timezone_unknown = FALSE; +int timezone_unknown = false; extern HostParms hostparm; //extern DDCinfo ddcinfo; @@ -141,13 +140,13 @@ QString findnet() QFile file("/tmp/.netinfo"); 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("HWaddr")) { - QString s = line.simplifyWhiteSpace(); + QString s = line.simplified(); s = s.section( " ", 0, 0 ); // s == "surname" netdev+=s; netdev+=" "; @@ -168,13 +167,13 @@ QString findnet_wireless() QFile file("/tmp/.netinfo_wireless"); 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("Nickname") || line.contains("ESSID")) { - QString s = line.simplifyWhiteSpace(); + QString s = line.simplified(); s = s.section( " ", 0, 0 ); // s == "surname" netdev+=s; netdev+=" "; @@ -222,7 +221,7 @@ static HostComboBox *HostNetDevice() return gc; }; - +/* static HostCheckBox *HostActiveonboot() { HostCheckBox *gc = new HostCheckBox("HostActiveonboot"); @@ -232,7 +231,6 @@ static HostCheckBox *HostActiveonboot() return gc; }; -/* static HostCheckBox *HostServiceSamba() { HostCheckBox *gc = new HostCheckBox("HostServiceSamba"); @@ -292,8 +290,8 @@ static HostComboBox *HostServiceSamba_domain() QFile file("/tmp/smbdomainlist"); 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.startsWith("domain")) @@ -307,7 +305,7 @@ static HostComboBox *HostServiceSamba_domain() } gc->addSelection("type_workgroup_here"); return gc; -};*/ +}; static HostCheckBox *HostLircWait() { @@ -317,7 +315,7 @@ static HostCheckBox *HostLircWait() gc->setHelpText(QObject::tr("System will wait for lirc before starting the UI ")); return gc; }; - +*/ static HostCheckBox *HostBEWait() { HostCheckBox *gc = new HostCheckBox("HostBEWait"); @@ -376,33 +374,32 @@ static HostCheckBox *HostServiceMythWEB() return gc; }; -// static HostCheckBox *HostServiceHobbitclient() -// { -// HostCheckBox *gc = new HostCheckBox("HostServiceHobbitclient"); -// gc->setLabel(QObject::tr("Hobbit-client")); -// gc->setValue(false); -// gc->setHelpText(QObject::tr("Report stats and other stuff to the master backend")); -// return gc; -// }; -// -// static GlobalCheckBox *GlobalServiceHobbitserver() -// { -// GlobalCheckBox *gc = new GlobalCheckBox("GlobalServiceHobbitserver"); -// gc->setLabel(QObject::tr("Hobbit-server")); -// gc->setValue(true); -// gc->setHelpText(QObject::tr("Run the hobbit server to collect stats and other stuff")); -// return gc; -// }; +static HostCheckBox *HostServiceHobbitclient() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceHobbitclient"); + gc->setLabel(QObject::tr("Hobbit-client")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Report stats and other stuff to the master backend")); + return gc; +}; +static GlobalCheckBox *GlobalServiceHobbitserver() +{ + GlobalCheckBox *gc = new GlobalCheckBox("GlobalServiceHobbitserver"); + gc->setLabel(QObject::tr("Hobbit-server")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Run the hobbit server to collect stats and other stuff")); + return gc; +}; -// static HostCheckBox *HostServiceRRD() -// { -// HostCheckBox *gc = new HostCheckBox("HostServiceRRD"); -// gc->setLabel(QObject::tr("rrd_stats")); -// gc->setValue(false); -// gc->setHelpText(QObject::tr("Collect stats and create graphs of various system resources.")); -// return gc; -// }; +static HostCheckBox *HostServiceRRD() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceRRD"); + gc->setLabel(QObject::tr("rrd_stats")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Collect stats and create graphs of various system resources.")); + return gc; +}; static HostCheckBox *HostUseDHCP() { @@ -462,8 +459,8 @@ static HostComboBox *HostMysqlserverip_listbox() QFile file("/tmp/mysqllist"); 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.startsWith(" address")) @@ -484,7 +481,7 @@ static HostComboBox *HostMysqlserverip_listbox() gc->setHelpText(QObject::tr("The IP address of the MasterBackend MySQL server.")); QString NETBOOT = getenv("NETBOOT"); - NETBOOT=NETBOOT.stripWhiteSpace(); + NETBOOT=NETBOOT.simplified(); if ( NETBOOT != "YES" ) { if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" )) @@ -676,8 +673,8 @@ static HostComboBox *HostGScreensaverTheme() QFile file(dirtxt); 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(); gc->addSelection(line); @@ -700,8 +697,8 @@ static HostComboBox *HostXScreensaverTheme() QFile file(dirtxt); 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(); gc->addSelection(line); @@ -1090,26 +1087,6 @@ static HostCheckBox *Hostpluginmythweather() }; -//static HostCheckBox *HostMiro() -//{ -// HostCheckBox *gc = new HostCheckBox("HostMiro"); -// gc->setLabel(QObject::tr("Miro")); -// gc->setValue(false); -// gc->setHelpText(QObject::tr("Miro is a popular, free, and open internet TV application. It brings video channels from thousands of sources and has more free HD than any other platform.")); -// return gc; -//}; - - -// static HostCheckBox *HostXine() -// { -// HostCheckBox *gc = new HostCheckBox("HostXine"); -// gc->setLabel(QObject::tr("Xine")); -// gc->setValue(false); -// gc->setHelpText(QObject::tr("Xine is a free multimedia player")); -// return gc; -// }; - - static HostCheckBox *Hostwebmin() { HostCheckBox *gc = new HostCheckBox("Hostwebmin"); @@ -1161,9 +1138,18 @@ static HostCheckBox *HostXBMC() static HostCheckBox *HostPLEXHT() { HostCheckBox *gc = new HostCheckBox("HostPLEXHT"); - gc->setLabel(QObject::tr("Plex Home Theater")); + gc->setLabel(QObject::tr("OpenPHT")); + gc->setValue(false); + gc->setHelpText(QObject::tr("OpenPHT is a community driven fork of Plex Home Theater. OpenPHT is a full-featured, powerful App that connects to Plex Media Server and is designed to be used in the living room from the comfort of your lounge.")); + return gc; +}; + +static HostCheckBox *HostPLEXMS() +{ + HostCheckBox *gc = new HostCheckBox("HostPLEXMS"); + gc->setLabel(QObject::tr("Plex Media Server")); gc->setValue(false); - gc->setHelpText(QObject::tr("Plex organizes all of your personal media, wherever you keep it, so you can enjoy it on any device.")); + gc->setHelpText(QObject::tr("Plex is a centralized home media playback system with a powerful central server - the Plex Media Server - that streams its media to many Plex player Apps.")); return gc; }; @@ -1188,7 +1174,7 @@ static HostComboBox *Hostfoldingusername() if ((new_line = strchr (username, '\n'))) new_line[0] = 0; - cout << "found old username " << username << endl; + std::cout << "found old username " << username << endl; //FIXME?? //gCoreContext->SetSetting("Hostfoldingusername", username); gCoreContext->SaveSetting("Hostfoldingusername", username); @@ -2386,20 +2372,20 @@ QString NetworkOptionsFrame::find_hostname() cmdtxt.append("bin/systemconfig.py -m dhcp_request -d " ); cmdtxt.append(hostparm.ThisHostDefaultInterface); myth_system(cmdtxt); - system(cmdtxt); + system(qPrintable(cmdtxt)); QString line; QFile file("/tmp/mvnetwork.dhcpinfo"); 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("new_host_name")) { - QString s = line.simplifyWhiteSpace(); + QString s = line.simplified(); s = s.section( "=", 1, 1 ); // s == "surname" - new_host = s.simplifyWhiteSpace(); + new_host = s.simplified(); } } file.close(); @@ -2431,14 +2417,14 @@ static HostCheckBox *HostAutodown() return gc; }; -static HostSpinBox *HostWakeupTime() -{ - HostSpinBox *gc = new HostSpinBox("HostWakeupTime", -1, 23, 1, true); - gc->setLabel(QObject::tr("Power on time")); - gc->setValue(6); - gc->setHelpText(QObject::tr("Select the hour to auto poweron this system. Use -1 to disable" )); - return gc; -} +//static HostSpinBox *HostWakeupTime() +//{ +// HostSpinBox *gc = new HostSpinBox("HostWakeupTime", -1, 23, 1, true); +// gc->setLabel(QObject::tr("Power on time")); +// gc->setValue(6); +// gc->setHelpText(QObject::tr("Select the hour to auto poweron this system. Use -1 to disable" )); +// return gc; +//} static HostSpinBox *HostShutdownTime() { @@ -2460,23 +2446,23 @@ static HostSpinBox *HostShutdownTime2() -static HostCheckBox *HostUseWOL() -{ - HostCheckBox *gc = new HostCheckBox("HostUseWOL"); - gc->setLabel(QObject::tr("Use Wake on Lan to turn on system")); - gc->setValue(true); - gc->setHelpText(QObject::tr("Unless you know what your doing leave it checked")); - return gc; -}; +//static HostCheckBox *HostUseWOL() +//{ +// HostCheckBox *gc = new HostCheckBox("HostUseWOL"); +// gc->setLabel(QObject::tr("Use Wake on Lan to turn on system")); +// gc->setValue(true); +// gc->setHelpText(QObject::tr("Unless you know what your doing leave it checked")); +// return gc; +//}; -static HostCheckBox *HostUseNVRAM() -{ - HostCheckBox *gc = new HostCheckBox("HostUseNVRAM"); - gc->setLabel(QObject::tr("Use nvram to turn on system")); - gc->setValue(true); - gc->setHelpText(QObject::tr("Leaved checked unless nvram causes problems.")); - return gc; -}; +//static HostCheckBox *HostUseNVRAM() +//{ +// HostCheckBox *gc = new HostCheckBox("HostUseNVRAM"); +// gc->setLabel(QObject::tr("Use nvram to turn on system")); +// gc->setValue(true); +// gc->setHelpText(QObject::tr("Leaved checked unless nvram causes problems.")); +// return gc; +//}; static HostCheckBox *HostUseXLargeMouse() @@ -2766,31 +2752,6 @@ SoundSettings::SoundSettings(): addChild(HostAudiotype); setTrigger(HostAudiotype); -// HostsyncXine = new HostCheckBox("HostsyncXine"); -// HostsyncXine->setLabel(QObject::tr("Xine")); -// HostsyncXine->setValue(true); -// -// HostsyncMplayer = new HostCheckBox("HostsyncMplayer"); -// HostsyncMplayer->setLabel(QObject::tr("mplayer")); -// HostsyncMplayer->setValue(true); -// -// HostsyncMythMusic = new HostCheckBox("HostsyncMythMusic"); -// HostsyncMythMusic->setLabel(QObject::tr("mythmusic")); -// HostsyncMythMusic->setValue(true); -// -// HostsyncMythFrontend = new HostCheckBox("HostsyncMythFrontend"); -// HostsyncMythFrontend->setLabel(QObject::tr("mythfrontend")); -// HostsyncMythFrontend->setValue(true); - - - - -// HorizontalConfigurationGroup *syncboxes = new HorizontalConfigurationGroup(false, false, true, true); -// syncboxes->addChild(HostsyncXine); -// syncboxes->addChild(HostsyncMplayer); -// syncboxes->addChild(HostsyncMythMusic); -// syncboxes->addChild(HostsyncMythFrontend); - HorizontalConfigurationGroup *lp = new HorizontalConfigurationGroup(false, false, true, true); HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true); @@ -2801,13 +2762,13 @@ SoundSettings::SoundSettings(): TransButtonSetting *TestAudiobutton = new TransButtonSetting(); TestAudiobutton->setLabel(tr("Test Device")); - TestAudiobutton->setHelpText(QObject::tr("Will play a sound using the selected default device.")); + TestAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device.")); lp->addChild(TestAudiobutton); lp->addChild(LoadOSSbutton); TransButtonSetting *TestALSAAudiobutton = new TransButtonSetting(); TestALSAAudiobutton->setLabel(tr("Test Device")); - TestALSAAudiobutton->setHelpText(QObject::tr("Will play a sound using the selected default device.")); + TestALSAAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device.")); lpalsa->addChild(TestALSAAudiobutton); lpalsa->addChild(LoadALSAbutton); @@ -2822,7 +2783,6 @@ SoundSettings::SoundSettings(): ConfigurationGroup* osssettings = new VerticalConfigurationGroup(false); osssettings->addChild(osslabel); osssettings->addChild(OSS); - // osssettings->addChild(syncboxes); osssettings->addChild(lp); connect(this, SIGNAL(oss_sig()), OSS, SLOT(soundossgathersettings())); @@ -2836,7 +2796,6 @@ SoundSettings::SoundSettings(): ConfigurationGroup* alsasettings = new VerticalConfigurationGroup(false); alsasettings->addChild(AlsaLabel); alsasettings->addChild(ALSA); -// alsasettings->addChild(syncboxes); alsasettings->addChild(lpalsa); connect(this, SIGNAL(alsa_sig()), @@ -2854,54 +2813,26 @@ SoundOSSsettings::SoundOSSsettings(): TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) { SetVertical(true); - HostSoundTypeout = new HostComboBox("HostSoundTypeout"); - HostSoundTypeout->setLabel(QObject::tr("Audio Type")); - HostSoundTypeout->addSelection("Analog"); - HostSoundTypeout->addSelection("Digital"); - HostSoundTypeout->setHelpText(QObject::tr("Select the connection type, Analog or Digital.")); - - HostSoundOssAnalog = new HostComboBox("HostSoundOssAnalog"); - HostSoundOssAnalog->setLabel(QObject::tr("Default Device")); - HostSoundOssAnalog->setHelpText(QObject::tr("Select the default audio output device for the system.")); - HostSoundOssDigital = new HostComboBox("HostSoundOssDigital"); - HostSoundOssDigital->setLabel(QObject::tr("Default Device")); - HostSoundOssDigital->setHelpText(QObject::tr("Select the default audio output device for the system.")); + HostSoundOssAll = new HostComboBox("HostSoundOssAll"); + HostSoundOssAll->setLabel(QObject::tr("Default Device")); + HostSoundOssAll->setHelpText(QObject::tr("Select the default audio output device for the system.")); fillossselection(); - int findossanalog=HostSoundOssAnalog->findSelection(hostparm.OLDHostSoundOSSAnalog ); - int findossdigital=HostSoundOssDigital->findSelection(hostparm.OLDHostSoundOSSDigital ); - HostSoundOssAnalog->setValue(findossanalog); - HostSoundOssDigital->setValue(findossdigital); - addChild(HostSoundTypeout); - setTrigger(HostSoundTypeout); - addTarget("Analog", HostSoundOssAnalog); - addTarget("Digital", HostSoundOssDigital); + int findossall=HostSoundOssAll->findSelection(hostparm.OLDHostSoundOSSAll ); + HostSoundOssAll->setValue(findossall); + addTarget("All", HostSoundOssAll); }; SoundALSAsettings::SoundALSAsettings(): TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) { SetVertical(true); - HostSoundALSATypeout = new HostComboBox("HostSoundALSATypeout"); - HostSoundALSATypeout->setLabel(QObject::tr("Audio Type")); - HostSoundALSATypeout->addSelection("Analog"); - HostSoundALSATypeout->addSelection("Digital"); - HostSoundALSATypeout->setHelpText(QObject::tr("Select the connection type, Analog or Digital.")); - - HostSoundALSAAnalog = new HostComboBox("HostSoundALSAAnalog"); - HostSoundALSAAnalog->setLabel(QObject::tr("Default Device")); - HostSoundALSAAnalog->setHelpText(QObject::tr("Select the default audio output device for the system. Chrome, aplay and other programs that use the default system device for audio will use this device. Mplayer will be set to use this device.")); - HostSoundALSADigital = new HostComboBox("HostSoundALSADigital"); - HostSoundALSADigital->setLabel(QObject::tr("Default Device")); - HostSoundALSADigital->setHelpText(QObject::tr("Select the default audio output device for the system. Chrome, aplay and other programs that use the default system device for audio will use this device. Mplayer will be set to use this device.")); + HostSoundALSAAll = new HostComboBox("HostSoundALSAAll"); + HostSoundALSAAll->setLabel(QObject::tr("Default Device")); + HostSoundALSAAll->setHelpText(QObject::tr("Select the default audio output device for the system. Chrome, aplay and other programs that use the default system device for audio will use this device. Mplayer will be set to use this device.")); fillALSAselection(); - int findalsaanalog=HostSoundALSAAnalog->findSelection(hostparm.OLDHostSoundALSAAnalog ); - int findalsadigital=HostSoundALSADigital->findSelection(hostparm.OLDHostSoundALSADigital ); - HostSoundALSAAnalog->setValue(findalsaanalog); - HostSoundALSADigital->setValue(findalsadigital); - addChild(HostSoundALSATypeout); - setTrigger(HostSoundALSATypeout); - addTarget("Analog", HostSoundALSAAnalog); - addTarget("Digital", HostSoundALSADigital); + int findalsaall=HostSoundALSAAll->findSelection(hostparm.OLDHostSoundALSAAll ); + HostSoundALSAAll->setValue(findalsaall); + addTarget("All", HostSoundALSAAll); }; void SoundOSSsettings::loadossdriver() @@ -2911,7 +2842,7 @@ void SoundOSSsettings::loadossdriver() cmdtxt="sudo "; cmdtxt.append(MV_ROOT) ; cmdtxt.append("bin/soundconfig.sh -t LOAD -i OSS &"); - system(cmdtxt); + system(qPrintable(cmdtxt)); int return_code = 0; QString msgtext = "Loading OSS driver" ; @@ -2920,6 +2851,7 @@ void SoundOSSsettings::loadossdriver() MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack, "ossbusy"); + int progressbar=1; MythProgressDialog *popupProgress = NULL; popupProgress = new MythProgressDialog(msgtext, 50); @@ -2957,7 +2889,6 @@ void SoundOSSsettings::loadossdriver() busyPopup = NULL; } - if (popupProgress) { popupProgress->Close(); @@ -2965,7 +2896,6 @@ void SoundOSSsettings::loadossdriver() } fillossselection(); - } void SoundALSAsettings::loadalsadriver() { @@ -2973,9 +2903,11 @@ void SoundALSAsettings::loadalsadriver() cmdtxt="sudo "; cmdtxt.append(MV_ROOT) ; cmdtxt.append("bin/soundconfig.sh -t LOAD -i ALSA &"); - system(cmdtxt); + system(qPrintable(cmdtxt)); int return_code = 0; + QString msgtext = "Loading ALSA driver" ; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); if (busyPopup->Create()) @@ -3022,11 +2954,7 @@ void SoundALSAsettings::loadalsadriver() popupProgress->deleteLater(); } - HostSoundALSAAnalog-> clearSelections(); - HostSoundALSADigital-> clearSelections(); - fillALSAselection(); - } void SoundOSSsettings::fillossselection() { @@ -3040,14 +2968,12 @@ void SoundOSSsettings::fillossselection() QRegExp sep( "\t" ); QFile file(currentfile); QString ossfound="false"; - HostSoundOssAnalog->clearSelections(); - HostSoundOssDigital-> clearSelections(); - + HostSoundOssAll->clearSelections(); 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("device index") ) @@ -3055,24 +2981,20 @@ void SoundOSSsettings::fillossselection() legacy_device = t.readLine(); legacy_device= legacy_device.section( "/",2,2); currentitemtext=line.section( "/" , 0 ,0 ); - simpleitem = currentitemtext.simplifyWhiteSpace(); + simpleitem = currentitemtext.simplified(); simpleitem = simpleitem.remove ( "(" ); simpleitem = simpleitem.remove ( ")" ); simpleitem.append(" ("); simpleitem.append(legacy_device); simpleitem.append(")"); - if (line.contains("spdout") || line.contains("digital") ) - HostSoundOssDigital->addSelection(simpleitem); - else - HostSoundOssAnalog->addSelection(simpleitem); + HostSoundOssAll->addSelection(simpleitem); ossfound="true"; } } if (ossfound=="false") { - simpleitem="No cards found, try loading the OSS drivers"; - HostSoundOssAnalog->addSelection(simpleitem); - HostSoundOssDigital->addSelection(simpleitem); + simpleitem="No devices found, try loading the OSS driver"; + HostSoundOssAll->addSelection(simpleitem); } } return ; @@ -3081,9 +3003,8 @@ void SoundOSSsettings::fillossselection() void SoundALSAsettings::fillALSAselection() { - HostSoundALSAAnalog-> clearSelections(); - HostSoundALSADigital-> clearSelections(); - myth_system("aplay -l > /tmp/alsadevices"); + HostSoundALSAAll-> clearSelections(); + myth_system("aplay -l > /tmp/alsadevices 2>&1"); QString currentfile = "/tmp/alsadevices"; QString line; QString hwdevice; @@ -3092,24 +3013,25 @@ void SoundALSAsettings::fillALSAselection() QString temphwdevice; QString simpleitem; QFile file(currentfile); + 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("no soundcards found...")) + { + simpleitem="No devices found, try loading the ALSA driver"; + HostSoundALSAAll->addSelection(simpleitem); + break; + } if (line.startsWith("card") ) { - if (line.contains("snd_ctl_card_info")) - { - simpleitem="Try loading the alsa drivers"; - HostSoundALSAAnalog->addSelection(simpleitem); - HostSoundALSADigital->addSelection(simpleitem); - break; - } //card 0: I82801DBICH4:q [Intel 82801DB-ICH4], device 0: Intel ICH [Intel 82801DB-ICH4] alsadescription=line.section( ", " , 0 ,0 ); - alsadescription=alsadescription.section(":",1,1); + alsadescription=alsadescription.section(": ",1,1); + alsadescription=alsadescription.section(" ",0,0); alsadescription2=line.section( ", " , 1 ,1 ); //alsadescription2=alsadescription.section(":",0,0); @@ -3122,11 +3044,8 @@ void SoundALSAsettings::fillALSAselection() temphwdevice=temphwdevice.section(" ",-1,-1 ); hwdevice.append(","); hwdevice.append(temphwdevice); - simpleitem=alsadescription2 + "(plughw:" + hwdevice + ")"; - if (line.contains("IEC958") || line.contains("Digital") || line.contains("PCM") || line.contains("HDMI")) - HostSoundALSADigital->addSelection(simpleitem); - else - HostSoundALSAAnalog->addSelection(simpleitem); + simpleitem=alsadescription + " " + alsadescription2 + "(plughw:" + alsadescription + "," + temphwdevice + ")"; + HostSoundALSAAll->addSelection(simpleitem); } } } @@ -3135,15 +3054,15 @@ void SoundALSAsettings::fillALSAselection() QFile file1(currentfile); if ( file1.open(QIODevice::ReadOnly | QIODevice::Text) ) { - Q3TextStream t( &file1 ); // use a text stream - while ( !t.eof() ) + QTextStream t( &file1 ); // use a text stream + while ( !t.atEnd() ) { line = t.readLine(); if (line.startsWith("iec958:") ) { alsadescription=line; simpleitem=alsadescription + "(plug:iec958)"; - HostSoundALSADigital->addSelection(simpleitem); + HostSoundALSAAll->addSelection(simpleitem); break; } } @@ -3154,20 +3073,12 @@ void SoundALSAsettings::fillALSAselection() void SoundSettings::soundossgathersettings_1 (void) { hostparm.ThisHostAudiotype = HostAudiotype->getValue(); -// hostparm.ThisHostsyncXine = HostsyncXine->getValue(); -// hostparm.ThisHostsyncMplayer = HostsyncMplayer->getValue(); -// hostparm.ThisHostsyncMythMusic = HostsyncMythMusic->getValue(); -// hostparm.ThisHostsyncMythFrontend = HostsyncMythFrontend->getValue(); // emit the signal to call soundossgathersetting. emit oss_sig(); }; void SoundSettings::soundalsagathersettings_1 (void) { hostparm.ThisHostAudiotype = HostAudiotype->getValue(); -// hostparm.ThisHostsyncXine = HostsyncXine->getValue(); -// hostparm.ThisHostsyncMplayer = HostsyncMplayer->getValue(); -// hostparm.ThisHostsyncMythMusic = HostsyncMythMusic->getValue(); -// hostparm.ThisHostsyncMythFrontend = HostsyncMythFrontend->getValue(); // emit the signal to call soundALSAgathersetting. emit alsa_sig(); }; @@ -3175,18 +3086,9 @@ void SoundSettings::soundalsagathersettings_1 (void) void SoundOSSsettings::soundossgathersettings(void) { - hostparm.ThisHostSoundTypeout = HostSoundTypeout->getValue() ; - hostparm.ThisHostSoundOSSAnalog = HostSoundOssAnalog->getValue(); - hostparm.ThisHostSoundOSSDigital = HostSoundOssDigital->getValue(); + hostparm.ThisHostSoundOSSAll = HostSoundOssAll->getValue(); QString tempdevice; - if ( hostparm.ThisHostSoundTypeout == "Analog" ) - { - tempdevice = hostparm.ThisHostSoundOSSAnalog ; - } - else - { - tempdevice = hostparm.ThisHostSoundOSSDigital ; - }; + tempdevice = hostparm.ThisHostSoundOSSAll ; tempdevice = tempdevice.section( "(", 1,1 ); tempdevice = tempdevice.section( ")", 0,0 ); hostparm.ThisHostSoundDevice = "/dev/"; @@ -3194,8 +3096,8 @@ void SoundOSSsettings::soundossgathersettings(void) // Add info popup right here QString cmdtxt; cmdtxt=MV_ROOT ; - cmdtxt.append("bin/soundconfig.sh -t test -i OSS -d " + hostparm.ThisHostSoundDevice + "&"); - system(cmdtxt); + cmdtxt.append("bin/soundconfig.sh -t test -i OSS -d " + hostparm.ThisHostSoundDevice + "&"); + system(qPrintable(cmdtxt)); int return_code = 0; QString msgtext = "Playing Test Audio" ; @@ -3210,10 +3112,6 @@ void SoundOSSsettings::soundossgathersettings(void) popupProgress->setProgress(progressbar); } - - - - if (busyPopup->Create()) { popupStack->AddScreen(busyPopup, false); @@ -3224,9 +3122,6 @@ void SoundOSSsettings::soundossgathersettings(void) busyPopup = NULL; } - - - while ( return_code == 0 ) { progressbar++; @@ -3256,19 +3151,10 @@ void SoundOSSsettings::soundossgathersettings(void) void SoundALSAsettings::soundalsagathersettings(void) { - hostparm.ThisHostSoundALSATypeout = HostSoundALSATypeout->getValue() ; - hostparm.ThisHostSoundALSAAnalog = HostSoundALSAAnalog->getValue(); - hostparm.ThisHostSoundALSADigital = HostSoundALSADigital->getValue(); + hostparm.ThisHostSoundALSAAll = HostSoundALSAAll->getValue(); QString tempdevice; - if ( hostparm.ThisHostSoundALSATypeout == "Analog" ) - { - tempdevice = hostparm.ThisHostSoundALSAAnalog ; - } - else - { - tempdevice = hostparm.ThisHostSoundALSADigital ; - }; + tempdevice = hostparm.ThisHostSoundALSAAll ; tempdevice = tempdevice.section( "(", 1,1 ); tempdevice = tempdevice.section( ")", 0,0 ); hostparm.ThisHostSoundDevice = tempdevice; @@ -3276,7 +3162,7 @@ void SoundALSAsettings::soundalsagathersettings(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/soundconfig.sh -t test -i ALSA -d " + hostparm.ThisHostSoundDevice + "&"); - system(cmdtxt); + system(qPrintable(cmdtxt)); int return_code = 0; QString msgtext = "Playing Test Audio" ; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); @@ -3300,7 +3186,6 @@ void SoundALSAsettings::soundalsagathersettings(void) } - while ( return_code == 0 ) { progressbar++; @@ -3326,9 +3211,6 @@ void SoundALSAsettings::soundalsagathersettings(void) popupProgress->deleteLater(); } - - - }; @@ -3480,7 +3362,7 @@ void pre_writesettings () //I don't think this is needed anymore tz=gCoreContext->GetSetting("HostTimeZone"); if ( tz.isEmpty() || (tz == "Unknown")) - timezone_unknown = TRUE; + timezone_unknown = true; //----------- tregion=gCoreContext->GetSetting("HostTimeZoneRegion"); @@ -3918,27 +3800,15 @@ void writesettings () // AUDIO SETTINGS //****************************************************************************************** hostparm.ThisHostAudiotype = gCoreContext->GetSetting("HostAudiotype"); -// hostparm.ThisHostsyncXine = gCoreContext->GetSetting("HostsyncXine"); -// hostparm.ThisHostsyncMplayer = gCoreContext->GetSetting("HostsyncMplayer"); -// hostparm.ThisHostsyncMythMusic = gCoreContext->GetSetting("HostsyncMythMusic"); -// hostparm.ThisHostsyncMythFrontend = gCoreContext->GetSetting("HostsyncMythFrontend"); - hostparm.ThisHostSoundTypeout = gCoreContext->GetSetting("HostSoundTypeout") ; - hostparm.ThisHostSoundOSSAnalog = gCoreContext->GetSetting("HostSoundOssAnalog"); - hostparm.ThisHostSoundOSSDigital = gCoreContext->GetSetting("HostSoundOssDigital"); - hostparm.ThisHostSoundALSATypeout = gCoreContext->GetSetting("HostSoundALSATypeout") ; - hostparm.ThisHostSoundALSAAnalog = gCoreContext->GetSetting("HostSoundALSAAnalog"); - hostparm.ThisHostSoundALSADigital = gCoreContext->GetSetting("HostSoundALSADigital"); + hostparm.ThisHostSoundOSSAll = gCoreContext->GetSetting("HostSoundOssAll"); + hostparm.ThisHostSoundALSAAll = gCoreContext->GetSetting("HostSoundALSAAll"); if ( hostparm.ThisHostAudiotype == "OSS" ) { QString tempdevice; QChar tempchar ; hostparm.ThisHostSoundDevice = "/dev/dsp"; - if ( hostparm.ThisHostSoundTypeout == "Analog" ) - tempdevice = hostparm.ThisHostSoundOSSAnalog ; - - if ( hostparm.ThisHostSoundTypeout == "Digital" ) - tempdevice = hostparm.ThisHostSoundOSSDigital ; + tempdevice = hostparm.ThisHostSoundOSSAll ; int tlength=(tempdevice.length() -2 ); if ( tlength > 0 ) @@ -3952,19 +3822,12 @@ void writesettings () if ( hostparm.ThisHostAudiotype == "ALSA" ) { QString tempdevice; - hostparm.ThisHostSoundTypeout = hostparm.ThisHostSoundALSATypeout; - if ( hostparm.ThisHostSoundTypeout == "Digital" ) - tempdevice=hostparm.ThisHostSoundALSADigital; - if ( hostparm.ThisHostSoundTypeout == "Analog" ) - tempdevice=hostparm.ThisHostSoundALSAAnalog; + tempdevice=hostparm.ThisHostSoundALSAAll; tempdevice = tempdevice.section( "(", 1,1 ); tempdevice = tempdevice.section( ")", 0,0 ); hostparm.ThisHostSoundDevice = tempdevice; } -// Turn off internal audio controls is digital audio is seleced - if ( hostparm.ThisHostSoundTypeout == "Digital" ) - gCoreContext->SaveSetting("MythControlsVolume","0"); // LCD TYPE hostparm.ThisHostLCDType = gCoreContext->GetSetting("HostLCDType"); @@ -3994,16 +3857,15 @@ void writesettings () hostparm.ThisHostpluginmythvideo_dvdcss = gCoreContext->GetSetting("Hostpluginmythvideo_dvdcss"); hostparm.ThisHostpluginmythappletrailers= gCoreContext->GetSetting("Hostpluginmythappletrailers"); -// hostparm.ThisHostMiro= gCoreContext->GetSetting("HostMiro"); hostparm.ThisHostpluginmythgameMednafen= gCoreContext->GetSetting("HostpluginmythgameMednafen"); hostparm.ThisHostpluginmythgameROMDB= gCoreContext->GetSetting("HostpluginmythgameROMDB"); hostparm.ThisHostpluginmythgameMupen64= gCoreContext->GetSetting("HostpluginmythgameMupen64"); -// hostparm.ThisHostXine = gCoreContext->GetSetting("HostXine"); hostparm.ThisHostwebmin = gCoreContext->GetSetting("Hostwebmin"); hostparm.ThisHostHuluDesktop = gCoreContext->GetSetting("HostHuluDesktop"); hostparm.ThisHostwebonlinhes = gCoreContext->GetSetting("HostWebonlinhes"); hostparm.ThisHostXBMC = gCoreContext->GetSetting("HostXBMC"); hostparm.ThisHostPLEXHT = gCoreContext->GetSetting("HostPLEXHT"); + hostparm.ThisHostPLEXMS = gCoreContext->GetSetting("HostPLEXMS"); hostparm.ThisHostfoldingathome = gCoreContext->GetSetting("Hostfoldingathome"); hostparm.ThisHostfoldingusername = gCoreContext->GetSetting("Hostfoldingusername"); @@ -4088,7 +3950,7 @@ void writesettings () QString divider; QFile f( "/etc/systemconfig" ); - if( !f.open( IO_WriteOnly ) ) + if( !f.open( QIODevice::WriteOnly | QIODevice::Text ) ) std::cout << "Failed to open file /etc/systemconfig." << std::endl; QTextStream myfile( &f ); @@ -4298,12 +4160,7 @@ void writesettings () myfile << systemheader ; myfile << divider ; myfile << "Audiotype=\"" + hostparm.ThisHostAudiotype + "\"\n"; - myfile << "Audiotypeout=\"" + hostparm.ThisHostSoundTypeout + "\"\n"; myfile << "SoundDevice=\"" + hostparm.ThisHostSoundDevice+ "\"\n"; -// myfile << "syncXine=\"" + hostparm.ThisHostsyncXine + "\"\n"; -// myfile << "syncMplayer=\"" + hostparm.ThisHostsyncMplayer + "\"\n"; -// myfile << "syncMythMusic=\"" + hostparm.ThisHostsyncMythMusic + "\"\n"; -// myfile << "syncMythFrontend=\"" + hostparm.ThisHostsyncMythFrontend + "\"\n"; systemheader= "\n# Software settings\n" ; @@ -4333,15 +4190,14 @@ void writesettings () myfile << "dvdcss=\"" + hostparm.ThisHostpluginmythvideo_dvdcss + "\"\n"; myfile << "mythappletrailers=\"" + hostparm.ThisHostpluginmythappletrailers + "\"\n"; -// myfile << "miro=\"" + hostparm.ThisHostMiro + "\"\n"; myfile << "webonlinhes=\"" + hostparm.ThisHostwebonlinhes + "\"\n"; myfile << "huludesktop=\"" + hostparm.ThisHostHuluDesktop + "\"\n"; myfile << "kodi=\"" + hostparm.ThisHostXBMC + "\"\n"; myfile << "plexhometheater=\"" + hostparm.ThisHostPLEXHT + "\"\n"; + myfile << "plexmediaserver=\"" + hostparm.ThisHostPLEXMS + "\"\n"; myfile << "foldingathome=\"" + hostparm.ThisHostfoldingathome + "\"\n"; myfile << "foldingusername=\"" + hostparm.ThisHostfoldingusername + "\"\n"; myfile << "foldingworksize=\"" + hostparm.ThisHostfoldingworksize + "\"\n"; - // myfile << "xine=\"" + hostparm.ThisHostXine + "\"\n"; myfile << "webmin=\"" + hostparm.ThisHostwebmin + "\"\n"; @@ -4656,23 +4512,33 @@ MythInstallSettings::MythInstallSettings() { //remove old sound card setting from the db. This is useful for when the saved setting is no longer valid for this machine. // Later search the list and set the value to the old setting if found in the dropdown. - hostparm.OLDHostSoundOSSAnalog = gCoreContext->GetSetting("HostSoundOssAnalog"); - hostparm.OLDHostSoundOSSDigital = gCoreContext->GetSetting("HostSoundOssDigital"); - hostparm.OLDHostSoundALSAAnalog = gCoreContext->GetSetting("HostSoundALSAAnalog"); - hostparm.OLDHostSoundALSADigital= gCoreContext->GetSetting("HostSoundALSADigital"); + hostparm.OLDHostSoundOSSAll = gCoreContext->GetSetting("HostSoundOssAll"); + hostparm.OLDHostSoundALSAAll = gCoreContext->GetSetting("HostSoundALSAAll"); MSqlQuery query(MSqlQuery::InitCon()); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssAll'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssAnalog'; " ); query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); query.exec(); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssDigital'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSAAll'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSAAnalog'; " ); query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); query.exec(); query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSADigital'; " ); query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); query.exec(); - query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssDigital'; " ); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSATypeout'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundTypeout'; " ); query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); query.exec(); @@ -4758,15 +4624,14 @@ MythInstallSettings::MythInstallSettings() ConfigurationGroup *GridShowPlugin4 = new GridConfigurationGroup(2,false); GridShowPlugin4->setLabel(QObject::tr("Programs (3/4)")); GridShowPlugin4->addChild(Hostpluginmythappletrailers()); - //GridShowPlugin4->addChild(HostMiro()); - //GridShowPlugin4->addChild(HostXine()); GridShowPlugin4->addChild(HostHuluDesktop()); GridShowPlugin4->addChild(HostPLEXHT()); + GridShowPlugin4->addChild(HostPLEXMS()); GridShowPlugin4->addChild(Hostwebmin()); GridShowPlugin4->addChild(Hostwebonlinhes()); GridShowPlugin4->addChild(HostXBMC()); - ConfigurationGroup *GridShowPlugin5 = new GridConfigurationGroup(2); + //ConfigurationGroup *GridShowPlugin5 = new GridConfigurationGroup(2); ConfigurationGroup *GridShowPlugin6 = new VerticalConfigurationGroup(false,true); GridShowPlugin6->setLabel(QObject::tr("Programs (4/4)")); @@ -4859,5 +4724,3 @@ MythInstallSettings::MythInstallSettings() } }; - - diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h index cd2983b..3a53048 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h @@ -190,10 +190,6 @@ class SoundSettings: public TriggeredConfigurationGroup { public: SoundSettings(); HostComboBox *HostAudiotype; - HostCheckBox *HostsyncXine; - HostCheckBox *HostsyncMplayer; - HostCheckBox *HostsyncMythMusic; - HostCheckBox *HostsyncMythFrontend; signals: @@ -210,9 +206,7 @@ class SoundOSSsettings: public TriggeredConfigurationGroup { Q_OBJECT public: SoundOSSsettings(); - HostComboBox *HostSoundOssAnalog; - HostComboBox *HostSoundOssDigital; - HostComboBox *HostSoundTypeout; + HostComboBox *HostSoundOssAll; void fillossselection(); public slots: void soundossgathersettings(); @@ -223,9 +217,7 @@ class SoundALSAsettings: public TriggeredConfigurationGroup { Q_OBJECT public: SoundALSAsettings(); - HostComboBox *HostSoundALSAAnalog; - HostComboBox *HostSoundALSADigital; - HostComboBox *HostSoundALSATypeout; + HostComboBox *HostSoundALSAAll; void fillALSAselection(); public slots: void soundalsagathersettings(); @@ -483,28 +475,14 @@ struct HostParms QString ThisHostXNvidia1080i; QString ThisHostXNvidia720p; QString ThisHostXNvidia480p; - QString ThisHostAudiotype; - - QString ThisHostSoundTypeout; - QString ThisHostSoundOSSAnalog; - QString OLDHostSoundOSSAnalog; - QString ThisHostSoundOSSDigital; - QString OLDHostSoundOSSDigital; - QString ThisHostSoundDigital; + QString ThisHostAudiotype; + QString ThisHostSoundOSSAll; + QString OLDHostSoundOSSAll; QString ThisHostSoundDevice; + QString ThisHostSoundALSAAll; + QString OLDHostSoundALSAAll; - QString ThisHostSoundALSAAnalog; - QString OLDHostSoundALSAAnalog; - QString ThisHostSoundALSADigital; - QString OLDHostSoundALSADigital; - QString ThisHostSoundALSATypeout; - - - QString ThisHostsyncXine; - QString ThisHostsyncMplayer; - QString ThisHostsyncMythMusic; - QString ThisHostsyncMythFrontend; QString ThisHostLCDType; QString ThisHostRemoteBackup; QString ThisHostRemoteBackupDir; @@ -521,10 +499,10 @@ struct HostParms QString ThisHostpluginmythvideo_dvdcss; QString ThisHostpluginmythappletrailers; -// QString ThisHostMiro; QString ThisHostwebonlinhes; QString ThisHostXBMC; QString ThisHostPLEXHT; + QString ThisHostPLEXMS; QString ThisHostHuluDesktop; QString ThisHostpluginmythgameMame; @@ -536,7 +514,6 @@ struct HostParms QString ThisHostpluginmythgameDolphin; QString ThisHostpluginmythgameXe; -// QString ThisHostXine; QString ThisHostwebmin; QString ThisHostfoldingathome; QString ThisHostfoldingusername; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp index 4c243b5..b6e66cd 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp @@ -1,7 +1,4 @@ //#include <qapplication.h> -//Added by qt3to4: -#include <Q3TextStream> - #include "installdialog.h" #include "installsettings.h" @@ -16,7 +13,7 @@ #include <QApplication> #include <QFileInfo> #include <QDir> - +#include <QTextStream> #include <cstdlib> @@ -151,7 +148,8 @@ int main(int argc, char **argv) bShowSettings = true; LOG(VB_GENERAL, LOG_INFO, QString("mythinstall: Screen stuff")); QString tmpArg = (cmdline.toString("screen")) ; - QStringList pairs = QStringList::split(",", tmpArg); +// QStringList pairs = QStringList::split(",", tmpArg); + QStringList pairs = tmpArg.split(","); for (int index = 0; index < pairs.size(); ++index) { if ( pairs[index] == "network" ) @@ -330,7 +328,8 @@ int main(int argc, char **argv) "mythweather", "mythzoneminder", "huludesktop", - "plex-home-theater", + "openpht", + "plex-media-server", "kodi", "webmin", "web-on-linhes", @@ -356,6 +355,7 @@ int main(int argc, char **argv) "Hostpluginmythzoneminder", "HostHuluDesktop", "HostPLEXHT", + "HostPLEXMS", "HostXBMC", "Hostwebmin", "Hostwebonlinhes", @@ -399,10 +399,9 @@ int main(int argc, char **argv) int status = system("diff /tmp/systemconfig.bak /etc/systemconfig"); bool restart = false; //save my settings in case db switches - QString cmdtxt; - cmdtxt=MV_ROOT ; - cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb); - system(cmdtxt); + QString cmdtxt=MV_ROOT; + cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb); + system(qPrintable(cmdtxt)); if ( status != 0 ) { @@ -415,9 +414,9 @@ int main(int argc, char **argv) restart = true; //db changed save setting from olddb QString cmdtxt; - cmdtxt=MV_ROOT ; + cmdtxt=MV_ROOT; cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb ) ; - system(cmdtxt); + system(qPrintable(cmdtxt)); } if ( runconfig ) @@ -458,7 +457,7 @@ int main(int argc, char **argv) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/systemconfig.sh reloadfe" ); - system(cmdtxt); + system(qPrintable(cmdtxt)); } gCoreContext->ActivateSettingsCache(false); gCoreContext->ClearSettingsCache(); @@ -594,8 +593,8 @@ int main(int argc, char **argv) QFile file("/usr/MythVantage/README"); 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(); problems->append(line); 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 ); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro index 225d755..8f069e6 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro @@ -3,8 +3,8 @@ PREFIX = /usr/include/mythtv -LIBVERSION = 0.27 -VERSION = 0.27.0 +LIBVERSION = 0.28 +VERSION = 0.28.0 @@ -49,7 +49,5 @@ QMAKE_CLEAN += $(TARGET) HEADERS += installdialog.h commandlineparser.h installsettings.h settemplate.h installationtype.h autocard.h xorgsettings.h password_manage.h misc_settings.h mv_common.h infrared.h compat-mv.h supplemental.h vnc.h fileshare.h SOURCES += main.cpp commandlineparser.cpp installdialog.cpp installsettings.cpp settemplate.cpp installationtype.cpp autocard.cpp xorgsettings.cpp password_manage.cpp misc_settings.cpp infrared.cpp compat-mv.cpp supplemental.cpp vnc.cpp fileshare.cpp - -#The following line was inserted by qt3to4 -QT += qt3support sql xml network +QT += sql xml network widgets diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp index ed7d369..11e2974 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp @@ -1,14 +1,14 @@ #include <unistd.h> #include "password_manage.h" -//Added by qt3to4: -#include <Q3TextStream> +#include <QTextStream> #include <qapplication.h> #include "mythmiscutil.h" #include "mythsystemlegacy.h" #include <qdir.h> #include <iostream> +using namespace std; /****************************************************************************/ typedef enum { @@ -17,7 +17,7 @@ typedef enum { UseraddPopup_DELETE } UseraddPopupResult; -bool passtoggle = TRUE; +bool passtoggle = true; QString invalid_chars = "&<>/~`;:!"; class AddUserPopup @@ -30,7 +30,7 @@ public: UseraddPopupResult AddUserPopup::showPopup(MythMainWindow *parent, QString title, QString message, QString& text) { - MythPopupBox *popup = new MythPopupBox(parent, title); + MythPopupBox *popup = new MythPopupBox(parent, title.toLatin1().constData()); popup->addLabel(message); MythLineEdit *textEdit = new MythLineEdit(popup, "chooseEdit"); @@ -63,8 +63,8 @@ void UserManagement::user_fillselection() QFile file("/etc/passwd"); 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(); user = line.section(":",0,0); @@ -78,7 +78,7 @@ void UserManagement::user_fillselection() } -bool UserManagement::user_exisit_check(QString name) +bool UserManagement::user_exist_check(QString name) { QString line; QString user; @@ -89,8 +89,8 @@ bool UserManagement::user_exisit_check(QString name) QFile file("/etc/passwd"); 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(); user = line.section(":",0,0); @@ -118,13 +118,13 @@ bool UserManagement::user_valid_check(QString check_string) upperlimit = invalid_chars.length() -1 ; for(i= 0; i <= upperlimit; i++) { - found_char = FALSE; + found_char = false; current_char = invalid_chars.at(i); - found_char = check_string.contains(current_char,FALSE); + found_char = check_string.contains(current_char, Qt::CaseInsensitive); if ( found_char ) - return FALSE; + return false; } - return TRUE ; + return true ; } @@ -142,7 +142,7 @@ UserManagement::UserManagement(): userpass1= new TransLineEditSetting(true); userpass1->setLabel("Password"); userpass1->SetPasswordEcho(passtoggle); - userpass1->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + userpass1->setHelpText("The following characters will not be accepted: " + invalid_chars); passToggleButton = new TransButtonSetting; @@ -157,7 +157,7 @@ UserManagement::UserManagement(): usercreateButton = new TransButtonSetting; usercreateButton->setLabel("Create New User Account"); - usercreateButton->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + usercreateButton->setHelpText("The following characters will not be accepted: " + invalid_chars); userdeleteButton = new TransButtonSetting; userdeleteButton->setLabel("Delete User Account"); @@ -240,8 +240,8 @@ void UserManagement::usercreatepopup() tr("Enter New User Name"), name); if (result == UseraddPopup_CANCEL) return; - //check if name exisit || add it - if ( user_exisit_check(name) ) + //check if name exist || add it + if ( user_exist_check(name) ) { info->setValue("User name " + name + " already exists. Cannot create user."); userlist->setFocus(); @@ -327,12 +327,12 @@ WebPassword::WebPassword(): webAuth->setValue(false); webuser = new HostLineEdit("Hostwebuser"); webuser->setLabel("Username"); - webuser->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + webuser->setHelpText("The following characters will not be accepted: " + invalid_chars); webpassword = new HostLineEdit("Hostwebpassword"); webpassword->setLabel("Password"); webpassword->SetPasswordEcho(passtoggle); - webpassword->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + webpassword->setHelpText("The following characters will not be accepted: " + invalid_chars); webpassToggleButton = new TransButtonSetting; webpassToggleButton->setLabel("Toggle Password View"); @@ -374,22 +374,20 @@ void WebPassword::togglepass() bool WebPassword::valid_check(QString check_string) { - // QString invalid_chars; QChar current_char; int upperlimit; bool found_char; int i ; - //invalid_chars = "&<>/~`;"; upperlimit = invalid_chars.length() -1 ; for(i= 0; i <= upperlimit; i++) { - found_char = FALSE; + found_char = false; current_char = invalid_chars.at(i); - found_char = check_string.contains(current_char,FALSE); + found_char = check_string.contains(current_char, Qt::CaseInsensitive); if ( found_char ) - return FALSE; + return false; } - return TRUE ; + return true ; } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h index 3b4b471..049cbce 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h @@ -1,11 +1,12 @@ #include <settings.h> #include "mythdialogs.h" -#include "libmyth/mythdialogs.h" +//#include "libmyth/mythdialogs.h" #include "libmyth/mythwidgets.h" #include "installsettings.h" +#include <QTextStream> - -class UserManagement: public VerticalConfigurationGroup { +class UserManagement: public + VerticalConfigurationGroup { Q_OBJECT public: UserManagement(); @@ -19,7 +20,7 @@ public: TransCheckBoxSetting *lockaccount; HostCheckBox *rootSSH; void user_fillselection(void); - bool user_exisit_check(QString); + bool user_exist_check(QString); bool user_valid_check(QString); public slots: diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp index f7f9963..8d9e671 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp @@ -32,7 +32,7 @@ void restart_frontend () cmdtxt=MV_ROOT ; cmdtxt.append("bin/systemconfig.sh reloadfe" ); //cout << "Calling systemconfig.sh reloadfe" << endl; - system(cmdtxt); + system(qPrintable(cmdtxt)); //system("/root/systemconfig.sh reloadfe" ); } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp index 26d83ee..4df8234 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp @@ -1,8 +1,6 @@ #include <unistd.h> #include "misc_settings.h" #include "mv_common.h" -//Added by qt3to4: -#include <Q3TextStream> #include "mythuihelper.h" #include "supplemental.h" diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp index 9f53f18..96cb107 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp @@ -1,8 +1,6 @@ #include <unistd.h> #include "misc_settings.h" #include "mv_common.h" -//Added by qt3to4: -#include <Q3TextStream> #include "mythuihelper.h" #include "vnc.h" diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp index 00a375e..eb6c893 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp @@ -1,9 +1,6 @@ #include <unistd.h> - - -//Added by qt3to4: -#include <Q3TextStream> +#include <QTextStream> #include "mythcontext.h" //#include "tv.h" #include <stdlib.h> @@ -25,8 +22,8 @@ void ReadDDCvalues (void) QFile file("/tmp/ddcinfo"); 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("Timing ranges:") ) @@ -43,7 +40,7 @@ void ReadDDCvalues (void) file.close(); } }; - +/* static HostCheckBox *HostXUseAdvanced() { HostCheckBox *gc = new HostCheckBox("HostXUseAdvanced"); @@ -64,7 +61,7 @@ static HostComboBox *HostXgeneric_connection() gc->setHelpText(QObject::tr("Video-out")); return gc; } - +*/ static HostCheckBox *HostXIgnoreEDID() { @@ -157,8 +154,8 @@ void AdvancedXGeneric_modelines::generic_fillselection(QString modelinefile ) QFile file(currentfile); 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.startsWith("ModeLine")) @@ -363,8 +360,8 @@ void AdvancedXNvidia_modelines::Nvidia_fillselection(QString modelinefile ) QFile file(currentfile); 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.startsWith("ModeLine")) @@ -512,7 +509,7 @@ AdvancedXcardtype::AdvancedXcardtype(): addChild(HostXcardtype); setTrigger(HostXcardtype); - AdvancedXGeneric_modelines *ADVANCEDXGENERICMODELINES = new AdvancedXGeneric_modelines; + //AdvancedXGeneric_modelines *ADVANCEDXGENERICMODELINES = new AdvancedXGeneric_modelines; AdvancedXNvidiaConnections *ADVANCEDXNVIDIACONNECTIONS = new AdvancedXNvidiaConnections; @@ -605,9 +602,9 @@ AdvancedXSettings::AdvancedXSettings(): HostXIgnoreConfig->setLabel(QObject::tr("User Supplied Configuration")); HostXIgnoreConfig->setValue(false); #ifdef __MVAPP__ - HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user.")); + HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /home/mythtv/templates/xorg.user.")); #else - HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user.")); + HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /home/mythtv/templates/xorg.user.")); #endif Setting* Advancedxsettings = HostXIgnoreConfig; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h index f8985cd..88f202c 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h @@ -4,7 +4,7 @@ #include "libmyth/mythwidgets.h" #include "installsettings.h" -#include <Q3TextStream> +#include <QTextStream> #include <qdir.h> @@ -114,8 +114,8 @@ static HostComboBox *HostXres() QString line; 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(); gc->addSelection(line) ; @@ -126,5 +126,3 @@ static HostComboBox *HostXres() return gc; } - - diff --git a/abs/core/mythinstall/PKGBUILD b/abs/core/mythinstall/PKGBUILD index 901f6ad..45b963d 100644 --- a/abs/core/mythinstall/PKGBUILD +++ b/abs/core/mythinstall/PKGBUILD @@ -1,11 +1,11 @@ # Maintainer: Jams pkgname=mythinstall -pkgver=8.3 -pkgrel=6 +pkgver=8.4 +pkgrel=4 pkgdesc="LinHES installer/systemconfig GUI." arch=('i686' 'x86_64') -depends=('mythtv>=0.27') -makedepends=('mythtv>=0.27') +depends=('mythtv>=0.28') +makedepends=('mythtv>=0.28') logofiles=`ls logo*.png` source=('install-ui.xml' $logofiles) @@ -14,7 +14,7 @@ build() { rsync -au $startdir/MythVantage-app $srcdir msg "Building mythinstall" - cd $srcdir/MythVantage-app/mythinstall && qmake-qt4 + cd $srcdir/MythVantage-app/mythinstall && qmake-qt5 make || exit 1 } @@ -34,10 +34,11 @@ package() { } md5sums=('39d6b7bd1ee305c5523a3cf66d4c2338' + 'c4c26977b723a4b5d6435ede73051d1b' + '27ce7f89a83864dfc5abe23c61964c0c' '3291ad55fe6d7884fc732313f1cc2924' '80c0326a253df275afbe875a8ec14a3c' - 'f7507a6c218c81228d2a3fbcd02565bb' - '27ce7f89a83864dfc5abe23c61964c0c' '2e85a1b9559557dade6e87daf2abb673' '532c5d9f1f8e1aef575ceecb69cc9c96' - '91393e9cca0e6168f772fb48c88d3829') + '91393e9cca0e6168f772fb48c88d3829' + 'f7507a6c218c81228d2a3fbcd02565bb') diff --git a/abs/core/mythinstall/logo-1.png b/abs/core/mythinstall/logo-1.png Binary files differindex a63adab..7a7afeb 100644..100755 --- a/abs/core/mythinstall/logo-1.png +++ b/abs/core/mythinstall/logo-1.png diff --git a/abs/core/mythinstall/logo-2.png b/abs/core/mythinstall/logo-2.png Binary files differindex 2b6e9b7..81012a3 100644 --- a/abs/core/mythinstall/logo-2.png +++ b/abs/core/mythinstall/logo-2.png diff --git a/abs/core/mythinstall/logo-3.png b/abs/core/mythinstall/logo-3.png Binary files differindex 800fefc..a63adab 100644 --- a/abs/core/mythinstall/logo-3.png +++ b/abs/core/mythinstall/logo-3.png diff --git a/abs/core/mythinstall/logo-4.png b/abs/core/mythinstall/logo-4.png Binary files differindex 81012a3..2b6e9b7 100644 --- a/abs/core/mythinstall/logo-4.png +++ b/abs/core/mythinstall/logo-4.png diff --git a/abs/core/mythinstall/logo-9.png b/abs/core/mythinstall/logo-9.png Binary files differnew file mode 100644 index 0000000..800fefc --- /dev/null +++ b/abs/core/mythinstall/logo-9.png |