8#include <QTextDocument>
10#include <private/qguiapplication_p.h>
11#include <qpa/qplatformtheme.h>
57 if (!
opt->checkBoxLabel().isNull())
60 m_javaMessageDialog.callMethod<
void>(
"setStandardIcon",
"(I)V",
opt->standardIcon());
64 m_javaMessageDialog.callMethod<
void>(
"setTile",
"(Ljava/lang/String;)V",
65 QJniObject::fromString(
str).object());
70 m_javaMessageDialog.callMethod<
void>(
"setText",
"(Ljava/lang/String;)V",
71 QJniObject::fromString(
str).object());
76 m_javaMessageDialog.callMethod<
void>(
"setInformativeText",
"(Ljava/lang/String;)V",
77 QJniObject::fromString(
str).object());
82 m_javaMessageDialog.callMethod<
void>(
"setDetailedText",
"(Ljava/lang/String;)V",
83 QJniObject::fromString(
str).object());
93 m_javaMessageDialog.callMethod<
void>(
"show",
"(J)V", jlong(
static_cast<QObject*
>(
this)));
102 if (
b.role == role) {
105 m_javaMessageDialog.callMethod<
void>(
"addButton",
"(ILjava/lang/String;)V",
b.id,
106 QJniObject::fromString(
label).object());
114 m_javaMessageDialog.callMethod<
void>(
"addButton",
"(ILjava/lang/String;)V",
i,
115 QJniObject::fromString(
text).object());
122 m_javaMessageDialog.callMethod<
void>(
"hide",
"()V");
147static void dialogResult(JNIEnv * , jobject , jlong handler,
int buttonID)
158#define FIND_AND_CHECK_CLASS(CLASS_NAME) \
159 clazz = env->FindClass(CLASS_NAME); \
161 __android_log_print(ANDROID_LOG_FATAL, QtAndroid::qtTagText(), QtAndroid::classErrorMsgFmt(), CLASS_NAME); \
167 const char QtMessageHandlerHelperClassName[] =
"org/qtproject/qt/android/QtMessageDialogHelper";
169 jclass clazz = qenv.findClass(QtMessageHandlerHelperClassName);
172 , QtMessageHandlerHelperClassName);
177 jclass appClass =
static_cast<jclass
>(env->NewGlobalRef(clazz));
180 __android_log_print(ANDROID_LOG_FATAL,
"Qt",
"RegisterNatives failed");
#define FIND_AND_CHECK_CLASS(CLASS_NAME)
int exec(ProcessEventsFlags flags=AllEvents)
Enters the main event loop and waits until exit() is called.
void exit(int returnCode=0)
Tells the event loop to exit with a return code.
bool isRunning() const
Returns true if the event loop is running; otherwise returns false.
static QPlatformTheme * platformTheme()
const CustomButton * customButton(int id)
QObject * parent() const
Returns a pointer to the parent object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString & replace(qsizetype i, qsizetype len, QChar after)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QString toHtmlEscaped() const
static bool registerNatives()
Combined button and popup list for selecting options.
static JNINativeMethod methods[]
static QString htmlText(QString text)
static void dialogResult(JNIEnv *, jobject, jlong handler, int buttonID)
static jclass g_messageDialogHelperClass
const char * classErrorMsgFmt()
Q_GUI_EXPORT bool mightBeRichText(const QString &)
Returns true if the string text is likely to be rich text; otherwise returns false.
#define Q_ARG(Type, data)
GLboolean GLboolean GLboolean b
GLuint GLsizei const GLchar * label
[43]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent