2#include <QCoreApplication>
42 QString label = tr(
"If you've added or altered channels,"
43 " please run 'mythfilldatabase' on the"
44 " master backend to populate the"
45 " database with guide information.");
50 LOG(VB_GENERAL, LOG_ERR,
"Can't create fill DB prompt?");
56 dia->SetReturnEvent(
this,
"mythfillprompt");
68 QStringList allproblems;
75#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
76 int limit = std::min(4, allproblems.size());
78 int limit = std::min(
static_cast<qsizetype
>(4), allproblems.size());
80 for (
int i = 0; i < limit; ++i)
82 problems.push_back(allproblems[i]);
84 if (problems.size() < allproblems.size())
86 problems.push_back(tr(
"...and more..."));
90 problems.push_back(QString());
93 problems.push_back(tr(
"Do you want to go back and fix this(these) "
94 "problem(s)?",
nullptr, problems.size()));
96 auto *dia =
new MythDialogBox(tr(
"Configuration Problems"), problems.join(
"\n"),
100 LOG(VB_GENERAL, LOG_ERR,
"Can't create Exit Prompt dialog?");
106 dia->SetReturnEvent(
this,
"problemprompt");
108 dia->AddButton(tr(
"Yes please"));
109 dia->AddButton(tr(
"No, I know what I am doing"),
126 QString resultid= dce->GetId();
127 int buttonnum = dce->GetResult();
129 if (resultid ==
"mythfillprompt")
133 else if (resultid ==
"problemprompt")
153 if (!commandString.isEmpty())
155 LOG(VB_GENERAL, LOG_ERR,
"backendrestart"+commandString);
bool CheckSetup(QStringList &problems)
Build up a string of common problems that the user should correct in the MythTV-Setup program.
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
static const Type kEventType
void masterPromptExit(void)
struct ExitPrompterPrivate * m_d
void customEvent(QEvent *event) override
Dialog asking for user confirmation.
static bool BackendIsRunning(void)
a backend process is running on this host
QString GetSetting(const QString &key, const QString &defaultval="")
void SendMessage(const QString &message)
bool IsMasterHost(void)
is this the same host as the master
Basic menu dialog, message and a list of options.
MythScreenStack * GetStack(const QString &Stackname)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
@ GENERIC_EXIT_OK
Exited with no error.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)