MythTV  master
mythtv/programs/mythtv-setup/main.cpp
Go to the documentation of this file.
1 #include <unistd.h>
2 #include <fcntl.h>
3 
4 #include <iostream>
5 #include <memory>
6 
7 #include <QString>
8 #include <QDir>
9 #include <QMap>
10 #include <QApplication>
11 #include <QFileInfo>
12 
13 #include "mythconfig.h"
14 #include "mythcontext.h"
15 #include "mythdbcon.h"
16 #include "dbutil.h"
17 #include "loggingserver.h"
18 #include "mythlogging.h"
19 #include "mythversion.h"
20 #include "langsettings.h"
21 #include "mythtranslation.h"
22 #include "exitcodes.h"
23 #include "exitprompt.h"
24 #include "storagegroupeditor.h"
25 #include "myththemedmenu.h"
26 #include "mythuihelper.h"
27 #include "mythdirs.h"
28 #include "channelscanner_cli.h"
29 #include "scanwizardconfig.h"
30 #include "scaninfo.h"
31 #include "channelimporter.h"
32 #include "cardutil.h"
33 #include "dbcheck.h"
34 #include "videosource.h"
35 #include "channeleditor.h"
36 #include "remoteutil.h"
37 #include "backendsettings.h"
38 #include "checksetup.h"
39 #include "startprompt.h"
40 #include "mythsystemevent.h"
41 #include "expertsettingseditor.h"
42 #include "commandlineparser.h"
43 #include "profilegroup.h"
44 #include "signalhandling.h"
45 #include "mythmiscutil.h"
46 #include "ssdp.h"
47 #include "cleanupguard.h"
48 
49 using namespace std;
50 
53 
55 static QString logfile;
56 
57 static void cleanup()
58 {
60 
61  delete gContext;
62  gContext = nullptr;
63 
64  delete qApp;
65 
67 }
68 
69 static void SetupMenuCallback(void* /* data */, QString& selection)
70 {
71  QString sel = selection.toLower();
72 
73  if (sel == "general")
74  {
76  auto *ssd = new StandardSettingDialog(mainStack, "generalsettings",
77  new BackendSettings());
78 
79  if (ssd->Create())
80  mainStack->AddScreen(ssd);
81  else
82  delete ssd;
83  }
84  else if (sel == "capture cards")
85  {
87  auto *ssd = new StandardSettingDialog(mainStack, "capturecardeditor",
88  new CaptureCardEditor());
89 
90  if (ssd->Create())
91  mainStack->AddScreen(ssd);
92  else
93  delete ssd;
94  }
95  else if (sel == "video sources")
96  {
98  auto *ssd = new StandardSettingDialog(mainStack, "videosourceeditor",
99  new VideoSourceEditor());
100  if (ssd->Create())
101  mainStack->AddScreen(ssd);
102  else
103  delete ssd;
104  }
105  else if (sel == "card inputs")
106  {
108  auto *ssd = new StandardSettingDialog(mainStack, "cardinputeditor",
109  new CardInputEditor());
110 
111  if (ssd->Create())
112  mainStack->AddScreen(ssd);
113  else
114  delete ssd;
115  }
116  else if (sel == "recording profile")
117  {
119  auto *ssd = new StandardSettingDialog(mainStack, "recordingprofileeditor",
120  new ProfileGroupEditor());
121 
122  if (ssd->Create())
123  mainStack->AddScreen(ssd);
124  else
125  delete ssd;
126  }
127  else if (sel == "channel editor")
128  {
130 
131  auto *chanedit = new ChannelEditor(mainStack);
132 
133  if (chanedit->Create())
134  mainStack->AddScreen(chanedit);
135  else
136  delete chanedit;
137  }
138  else if (sel == "storage groups")
139  {
141  auto *ssd = new StandardSettingDialog(mainStack, "storagegroupeditor",
142  new StorageGroupListEditor());
143 
144  if (ssd->Create())
145  mainStack->AddScreen(ssd);
146  else
147  delete ssd;
148  }
149  else if (sel == "systemeventeditor")
150  {
152 
153  auto *msee = new MythSystemEventEditor(mainStack, "System Event Editor");
154 
155  if (msee->Create())
156  mainStack->AddScreen(msee);
157  else
158  delete msee;
159  }
160  else if (sel.startsWith("exiting_app") || (sel == "standby_mode"))
161  {
162  if (!exitPrompt)
163  exitPrompt = new ExitPrompter();
165  }
166  else
167  LOG(VB_GENERAL, LOG_ERR, "Unknown menu action: " + selection);
168 }
169 
170 static bool RunMenu(const QString& themedir, const QString& themename)
171 {
172  QByteArray tmp = themedir.toLocal8Bit();
173  menu = new MythThemedMenu(
174  QString(tmp.constData()), "setup.xml",
175  GetMythMainWindow()->GetMainStack(), "mainmenu", false);
176 
177  if (menu->foundTheme())
178  {
181  return true;
182  }
183 
184  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't use theme '%1'").arg(themename));
185  delete menu;
186  menu = nullptr;
187 
188  return false;
189 }
190 
191 // If the theme specified in the DB is somehow broken, try a standard one:
192 //
193 static bool resetTheme(QString themedir, const QString &badtheme)
194 {
195  QString themename = DEFAULT_UI_THEME;
196 
197  if (badtheme == DEFAULT_UI_THEME)
198  themename = FALLBACK_UI_THEME;
199 
200  LOG(VB_GENERAL, LOG_ERR,
201  QString("Overriding broken theme '%1' with '%2'")
202  .arg(badtheme).arg(themename));
203 
204  gCoreContext->OverrideSettingForSession("Theme", themename);
205  themedir = GetMythUI()->FindThemeDir(themename);
206 
208  GetMythUI()->LoadQtConfig();
209  GetMythMainWindow()->Init();
211 
212  return RunMenu(themedir, themename);
213 }
214 
215 static int reloadTheme(void)
216 {
217  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
218  QString themedir = GetMythUI()->FindThemeDir(themename);
219  if (themedir.isEmpty())
220  {
221  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
222  .arg(themename));
223  return GENERIC_EXIT_NO_THEME;
224  }
225 
227 
229 
230  GetMythUI()->LoadQtConfig();
231 
232  if (menu)
233  {
234  menu->Close();
235  }
236  GetMythMainWindow()->Init();
239 
240  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
241  return GENERIC_EXIT_NO_THEME;
242 
243  return 0;
244 }
245 
246 int main(int argc, char *argv[])
247 {
248  QString geometry;
249  QString display;
250  bool doScan = false;
251  bool doScanList = false;
252  bool doScanSaveOnly = false;
253  bool scanInteractive = true;
254  bool expertMode = false;
255  uint scanImport = 0;
256  bool scanFTAOnly = false;
257  bool scanLCNOnly = false;
258  bool scanCompleteOnly = false;
259  bool scanFullChannelSearch = false;
260  bool addFullTS = false;
261  ServiceRequirements scanServiceRequirements = kRequireAV;
262  uint scanCardId = 0;
263  QString frequencyStandard = "atsc";
264  QString modulation = "vsb8";
265  QString region = "us";
266  QString scanInputName = "";
267 
269  if (!cmdline.Parse(argc, argv))
270  {
271  cmdline.PrintHelp();
273  }
274 
275  if (cmdline.toBool("showhelp"))
276  {
277  cmdline.PrintHelp();
278  return GENERIC_EXIT_OK;
279  }
280 
281  if (cmdline.toBool("showversion"))
282  {
284  return GENERIC_EXIT_OK;
285  }
286 
287  bool quiet = false;
288  bool use_display = true;
289  if (cmdline.toBool("scan"))
290  {
291  quiet = true;
292  use_display = false;
293  }
294 
295  CleanupGuard callCleanup(cleanup);
296 
297  if (use_display)
298  {
299 
300 #ifdef Q_OS_MAC
301  // Without this, we can't set focus to any of the CheckBoxSetting, and most
302  // of the MythPushButton widgets, and they don't use the themed background.
303  QApplication::setDesktopSettingsAware(false);
304 #endif
305  new QApplication(argc, argv);
306  }
307  else {
308  new QCoreApplication(argc, argv);
309  }
310  QCoreApplication::setApplicationName(MYTH_APPNAME_MYTHTV_SETUP);
311 
312 #ifndef _WIN32
313  QList<int> signallist;
314  signallist << SIGINT << SIGTERM << SIGSEGV << SIGABRT << SIGBUS << SIGFPE
315  << SIGILL;
316 #if ! CONFIG_DARWIN
317  signallist << SIGRTMIN;
318 #endif
319  SignalHandler::Init(signallist);
320  SignalHandler::SetHandler(SIGHUP, logSigHup);
321 #endif
322 
323  if (cmdline.toBool("display"))
324  display = cmdline.toString("display");
325  if (cmdline.toBool("geometry"))
326  geometry = cmdline.toString("geometry");
327 
328  QString mask("general");
329  int retval = cmdline.ConfigureLogging(mask, quiet);
330  if (retval != GENERIC_EXIT_OK)
331  return retval;
332 
333  if (cmdline.toBool("expert"))
334  expertMode = true;
335  if (cmdline.toBool("scanlist"))
336  doScanList = true;
337  if (cmdline.toBool("savescan"))
338  doScanSaveOnly = true;
339  if (cmdline.toBool("scannoninteractive"))
340  scanInteractive = false;
341 
342  if (cmdline.toBool("importscan"))
343  scanImport = cmdline.toUInt("importscan");
344  if (cmdline.toBool("ftaonly"))
345  scanFTAOnly = true;
346  if (cmdline.toBool("lcnonly"))
347  scanLCNOnly = true;
348  if (cmdline.toBool("completeonly"))
349  scanCompleteOnly = true;
350  if (cmdline.toBool("fullsearch"))
351  scanFullChannelSearch = true;
352  if (cmdline.toBool("addfullts"))
353  addFullTS = true;
354  if (cmdline.toBool("servicetype"))
355  {
356  scanServiceRequirements = kRequireNothing;
357  if (cmdline.toString("servicetype").contains("radio"))
358  scanServiceRequirements = kRequireAudio;
359  if (cmdline.toString("servicetype").contains("tv"))
360  scanServiceRequirements = kRequireAV;
361  if (cmdline.toString("servicetype").contains("tv+radio") ||
362  cmdline.toString("servicetype").contains("radio+tv"))
363  scanServiceRequirements = kRequireAudio;
364  if (cmdline.toString("servicetype").contains("all"))
365  scanServiceRequirements = kRequireNothing;
366  }
367 
368  if (!cmdline.toBool("noupnp"))
369  {
370  // start looking for any uPnP devices we can use like VBoxes
371  SSDP::Instance()->PerformSearch("ssdp:all");
372  }
373  if (cmdline.toBool("scan"))
374  {
375  scanCardId = cmdline.toUInt("scan");
376  doScan = true;
377  }
378  if (cmdline.toBool("freqstd"))
379  frequencyStandard = cmdline.toString("freqstd").toLower();
380  if (cmdline.toBool("modulation"))
381  modulation = cmdline.toString("modulation").toLower();
382  if (cmdline.toBool("region"))
383  region = cmdline.toString("region").toLower();
384  if (cmdline.toBool("inputname"))
385  scanInputName = cmdline.toString("inputname");
386 
387  if (!display.isEmpty())
388  {
390  }
391 
392  if (!geometry.isEmpty())
393  {
395  }
396 
398 
400  if (!gContext->Init(use_display,false,true)) // No Upnp, Prompt for db
401  {
402  LOG(VB_GENERAL, LOG_ERR, "Failed to init MythContext, exiting.");
404  }
405 
407 
408  if (!GetMythDB()->HaveSchema())
409  {
410  if (!InitializeMythSchema())
411  return GENERIC_EXIT_DB_ERROR;
412  }
413 
414  setHttpProxy();
415 
416  if (use_display)
417  {
418  GetMythUI()->LoadQtConfig();
419 
420  QString fileprefix = GetConfDir();
421 
422  QDir dir(fileprefix);
423  if (!dir.exists())
424  dir.mkdir(fileprefix);
425  }
426 
427  if (doScan)
428  {
429  bool okCardID = scanCardId != 0U;
430 
431  if (scanInputName.isEmpty())
432  scanInputName = CardUtil::GetInputName(scanCardId);
433 
434  bool okInputName = (scanInputName == CardUtil::GetInputName(scanCardId)
435  && scanInputName != "None");
436 
437  doScan = (okCardID && okInputName);
438 
439  if (!okCardID)
440  {
441  cerr << "You must enter a valid cardid to scan." << endl;
442  vector<uint> cardids = CardUtil::GetInputIDs();
443  if (cardids.empty())
444  {
445  cerr << "But no cards have been defined on this host"
446  << endl;
448  }
449  cerr << "Valid cards: " << endl;
450  for (uint id : cardids)
451  {
452  fprintf(stderr, "%5u: %s %s\n", id,
453  CardUtil::GetRawInputType(id).toLatin1().constData(),
454  CardUtil::GetVideoDevice(id).toLatin1().constData());
455  }
457  }
458 
459  if (!okInputName)
460  {
461  cerr << "You must enter a valid input to scan this card."
462  << endl;
463  cerr << "Valid input: "
464  << CardUtil::GetInputName(scanCardId).toLatin1().constData()
465  << endl;
467  }
468  }
469 
470  if (doScan)
471  {
472  int ret = 0;
473  uint inputid = scanCardId;
474  uint sourceid = CardUtil::GetSourceID(inputid);
475  QMap<QString,QString> startChan;
476  {
477  ChannelScannerCLI scanner(doScanSaveOnly, scanInteractive);
478 
479  int scantype = ScanTypeSetting::FullScan_ATSC;
480  if (frequencyStandard == "atsc")
481  scantype = ScanTypeSetting::FullScan_ATSC; // NOLINT(bugprone-branch-clone)
482  else if (frequencyStandard == "dvbt")
484  else if (frequencyStandard == "mpeg")
486  else if (frequencyStandard == "iptv")
487  {
489  scanner.ImportM3U(scanCardId, scanInputName, sourceid, true);
490  }
491  else if (frequencyStandard == "extern")
493  else
495 
496  scanner.Scan(scantype,
497  /* cardid */ scanCardId,
498  /* inputname */ scanInputName,
499  /* sourceid */ sourceid,
500  /* ignore signal timeout */ false,
501  /* follow_nit */ true,
502  /* test decryption */ true,
503  scanFTAOnly,
504  scanLCNOnly,
505  scanCompleteOnly,
506  scanFullChannelSearch,
507  addFullTS,
508  scanServiceRequirements,
509  // stuff needed for particular scans
510  /* mplexid */ 0,
511  startChan, frequencyStandard, modulation, region);
512  ret = qApp->exec();
513  }
514  return (ret) ? GENERIC_EXIT_NOT_OK : GENERIC_EXIT_OK;
515  }
516 
517  if (doScanList)
518  {
519  vector<ScanInfo> scans = LoadScanList();
520 
521  cout<<" scanid cardid sourceid processed date"<<endl;
522  for (auto & scan : scans)
523  {
524  printf("%5i %6i %8i %8s %20s\n",
525  scan.m_scanid, scan.m_cardid,
526  scan.m_sourceid, (scan.m_processed) ? "yes" : "no",
527  scan.m_scandate.toString(Qt::ISODate)
528  .toLatin1().constData());
529  }
530  cout<<endl;
531 
532  return GENERIC_EXIT_OK;
533  }
534 
535  if (scanImport)
536  {
537  cout<<"*** SCAN IMPORT START ***"<<endl;
538  {
539  ScanDTVTransportList list = LoadScan(scanImport);
540  ChannelImporter ci(false, true, true, true, false,
541  scanFTAOnly, scanLCNOnly, scanCompleteOnly,
542  scanFullChannelSearch, scanServiceRequirements);
543  ci.Process(list);
544  }
545  cout<<"*** SCAN IMPORT END ***"<<endl;
546  return GENERIC_EXIT_OK;
547  }
548 
549  MythTranslation::load("mythfrontend");
550 
551  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
552  QString themedir = GetMythUI()->FindThemeDir(themename);
553  if (themedir.isEmpty())
554  {
555  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
556  .arg(themename));
557  return GENERIC_EXIT_NO_THEME;
558  }
559 
560  MythMainWindow *mainWindow = GetMythMainWindow();
561  mainWindow->Init();
562  mainWindow->setWindowTitle(QObject::tr("MythTV Setup"));
563 
564  // We must reload the translation after a language change and this
565  // also means clearing the cached/loaded theme strings, so reload the
566  // theme which also triggers a translation reload
568  {
569  if (!reloadTheme())
570  return GENERIC_EXIT_NO_THEME;
571  }
572 
574  {
575  LOG(VB_GENERAL, LOG_ERR,
576  "MySQL time zone support is missing. "
577  "Please install it and try again. "
578  "See 'mysql_tzinfo_to_sql' for assistance.");
580  }
581 
582  if (!UpgradeTVDatabaseSchema(true))
583  {
584  LOG(VB_GENERAL, LOG_ERR, "Couldn't upgrade database to new schema.");
586  }
587 
588  // Refresh Global/Main Menu keys after DB update in case there was no DB
589  // when they were written originally
590  mainWindow->ReloadKeys();
591 
592  if (!startPrompt)
593  startPrompt = new StartPrompter();
595 
596  // Let the user select buttons, type values, scan for channels, etc.
597  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
598  return GENERIC_EXIT_NO_THEME;
599 
600  ExpertSettingsEditor *expertEditor = nullptr;
601  if (expertMode)
602  {
604  expertEditor =
605  new ExpertSettingsEditor(mainStack, "Expert Settings Editor");
606  if (expertEditor->Create())
607  mainStack->AddScreen(expertEditor);
608  else
609  {
610  delete expertEditor;
611  expertEditor = nullptr;
612  LOG(VB_GENERAL, LOG_ERR,
613  "Unable to create expert settings editor window");
614  return GENERIC_EXIT_OK;
615  }
616  }
617 
618  qApp->exec();
619 }
620 
621 /* vim: set expandtab tabstop=4 shiftwidth=4: */
vector< ScanInfo > LoadScanList(void)
Definition: scaninfo.cpp:252
#define GENERIC_EXIT_DB_ERROR
Database error.
Definition: exitcodes.h:17
Startup context for MythTV.
Definition: mythcontext.h:42
QString FindThemeDir(const QString &themename, bool doFallback=true)
Returns the full path to the theme denoted by themename.
bool UpgradeTVDatabaseSchema(const bool upgradeAllowed, const bool upgradeIfNoUI, const bool informSystemd)
Called from outside dbcheck.cpp to update the schema.
stderr
Definition: ttvdb.py:1426
def scan(profile, smoonURL, gate)
Definition: scan.py:57
static QString GetInputName(uint inputid)
Definition: cardutil.cpp:1698
static QString themedir
Definition: mythdirs.cpp:21
void LoadQtConfig(void)
void handleStart()
Definition: startprompt.cpp:35
void Scan(int scantype, uint cardid, const QString &inputname, uint sourceid, bool do_ignore_signal_timeout, bool do_follow_nit, bool do_test_decryption, bool do_fta_only, bool do_lcn_only, bool do_complete_only, bool do_full_channel_search, bool do_add_full_ts, ServiceRequirements service_requirements, uint mplexid, const QMap< QString, QString > &startChan, const QString &freq_std, const QString &mod, const QString &tbl, const QString &tbl_start=QString(), const QString &tbl_end=QString())
#define GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:10
void setHttpProxy(void)
Get network proxy settings from OS, and use for [Q]Http[Comms].
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
bool Create(void) override
Creates the UI screen.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
static void Init(QList< int > &signallist, QObject *parent=nullptr)
static bool resetTheme(QString themedir, const QString &badtheme)
void DestroyMythMainWindow(void)
void setCallback(void(*lcallback)(void *, QString &), void *data)
Set the themed menus callback function and data for that function.
#define DEFAULT_UI_THEME
Definition: mythuihelper.h:12
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythScreenStack * GetMainStack()
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
MythContext * gContext
This global variable contains the MythContext instance for the application.
Definition: mythcontext.cpp:62
static MythThemedMenu * menu
static void SetupMenuCallback(void *, QString &selection)
int main(int argc, char *argv[])
static guint32 * tmp
Definition: goom_core.c:35
#define MYTH_APPNAME_MYTHTV_SETUP
static void SetX11Display(const QString &display)
This needs to be set before MythUIHelper is initialized so that the MythUIHelper::Init() can detect X...
QString GetConfDir(void)
Definition: mythdirs.cpp:224
virtual void Close()
void ApplySettingsOverride(void)
Apply all overrides to the global context.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
void PerformSearch(const QString &sST, uint timeout_secs=2)
Definition: ssdp.cpp:201
#define GENERIC_EXIT_DB_NOTIMEZONE
Missing DB time zone support.
Definition: exitcodes.h:36
void OverrideSettingForSession(const QString &key, const QString &value)
QString GetSetting(const QString &key, const QString &defaultval="")
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
static void ParseGeometryOverride(const QString &geometry)
Parse an X11 style command line geometry string.
static void load(const QString &module_name)
Load a QTranslator for the user's preferred language.
static void Done(void)
unsigned int uint
Definition: compat.h:140
static vector< uint > GetInputIDs(const QString &videodevice=QString(), const QString &rawtype=QString(), const QString &inputname=QString(), QString hostname=QString())
Returns all inputids of inputs that uses the specified videodevice if specified, and optionally rawty...
Definition: cardutil.cpp:1269
static void SetHandler(int signum, SigHandlerFunc handler)
MythCommFlagCommandLineParser cmdline
static bool prompt(bool force=false)
Ask the user for the language to use.
StartPrompter * startPrompt
MythUIHelper * GetMythUI()
static void reload()
Reload all active translators based on the current language setting.
MythMainWindow * GetMythMainWindow(void)
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:273
#define FALLBACK_UI_THEME
Definition: mythuihelper.h:13
static int reloadTheme(void)
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
Themed menu class, used for main menus in MythTV frontend.
static SSDP * Instance()
Definition: ssdp.cpp:54
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
#define SIGHUP
Definition: compat.h:213
void SetEffectsEnabled(bool enable)
void Process(const ScanDTVTransportList &_transports, int sourceid=-1)
ServiceRequirements
#define MYTH_BINARY_VERSION
Update this whenever the plug-in ABI changes.
Definition: mythversion.h:16
bool foundTheme(void)
Returns true iff a theme has been found by a previous call to SetMenuTheme().
bool Init(bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)
An editor for MythSystemEvent handler commands.
ExitPrompter * exitPrompt
ScanDTVTransportList LoadScan(uint scanid)
Definition: scaninfo.cpp:73
static uint GetSourceID(uint inputid)
Definition: cardutil.cpp:1767
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:271
Default UTC.
Definition: mythdate.h:14
vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:140
#define GENERIC_EXIT_NO_THEME
No Theme available.
Definition: exitcodes.h:14
MythDB * GetMythDB(void)
Definition: mythdb.cpp:46
#define GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
Definition: exitcodes.h:13
static QString logfile
#define GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
Definition: exitcodes.h:15
Scans the transport when there is no tuner (for ASI)
void Init(bool mayReInit=true)
#define GENERIC_EXIT_NOT_OK
Exited with error.
Definition: exitcodes.h:11
uint toUInt(const QString &key) const
Returns stored QVariant as an unsigned integer, falling to default if not provided.
void ReinitDone(void)
void ReloadKeys(void)
static void cleanup()
static bool RunMenu(const QString &themedir, const QString &themename)
bool InitializeMythSchema(void)
command to get the the initial database layout from an empty database:
int ConfigureLogging(const QString &mask="general", unsigned int progress=0)
Read in logging options and initialize the logging interface.
static bool CheckTimeZoneSupport(void)
Check if MySQL has working timz zone support.
Definition: dbutil.cpp:869
#define GENERIC_EXIT_DB_OUTOFDATE
Database needs upgrade.
Definition: exitcodes.h:16