2#include <QCoreApplication>
41 QString label = tr(
"If you've added or altered channels,"
42 " please run 'mythfilldatabase' on the"
43 " master backend to populate the"
44 " database with guide information.");
49 LOG(VB_GENERAL, LOG_ERR,
"Can't create fill DB prompt?");
55 dia->SetReturnEvent(
this,
"mythfillprompt");
67 QStringList allproblems;
74#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
75 int limit = std::min(4, allproblems.size());
77 int limit = std::min(
static_cast<qsizetype
>(4), allproblems.size());
79 for (
int i = 0; i < limit; ++i)
81 problems.push_back(allproblems[i]);
83 if (problems.size() < allproblems.size())
85 problems.push_back(tr(
"...and more..."));
89 problems.push_back(QString());
92 problems.push_back(tr(
"Do you want to go back and fix this(these) "
93 "problem(s)?",
nullptr, problems.size()));
95 auto *dia =
new MythDialogBox(tr(
"Configuration Problems"), problems.join(
"\n"),
99 LOG(VB_GENERAL, LOG_ERR,
"Can't create Exit Prompt dialog?");
105 dia->SetReturnEvent(
this,
"problemprompt");
107 dia->AddButton(tr(
"Yes please"));
108 dia->AddButton(tr(
"No, I know what I am doing"),
125 QString resultid= dce->GetId();
126 int buttonnum = dce->GetResult();
128 if (resultid ==
"mythfillprompt")
132 else if (resultid ==
"problemprompt")
152 if (!commandString.isEmpty())
154 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)