info about shared memory, calls, events and log files.
This commit is contained in:
@@ -147,7 +147,7 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
|
||||
w->show();
|
||||
while(!w->windowCreated()) {
|
||||
doEvents();
|
||||
_app->processEvents();
|
||||
}
|
||||
|
||||
cmd->result = id;
|
||||
@@ -156,7 +156,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_CLOSE: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
if (_views.contains(wv)) {
|
||||
WebviewWindow *w= _views[wv];
|
||||
@@ -164,7 +163,7 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
w->closeView();
|
||||
cmd->result = true;
|
||||
while(w->isVisible()) {
|
||||
doEvents();
|
||||
_app->processEvents();
|
||||
}
|
||||
_view_js_callbacks.remove(wv);
|
||||
delete w;
|
||||
@@ -175,7 +174,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_SET_OU_TOKEN: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
QString ou_token = cmd->args[1].toString();
|
||||
if (_views.contains(wv)) {
|
||||
@@ -189,7 +187,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_SET_URL: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
QString url = cmd->args[1].toString();
|
||||
if (_views.contains(wv)) {
|
||||
@@ -205,7 +202,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_SET_HTML: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
QString html = cmd->args[1].toString();
|
||||
if (_views.contains(wv)) {
|
||||
@@ -220,7 +216,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_SET_TITLE: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
QString title = cmd->args[1].toString();
|
||||
if (_views.contains(wv)) {
|
||||
@@ -234,7 +229,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_RUN_JS: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
QString js = cmd->args[1].toString();
|
||||
if (_views.contains(wv)) {
|
||||
@@ -249,7 +243,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_CALL_JS: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
QString js = cmd->args[1].toString();
|
||||
if (_views.contains(wv)) {
|
||||
@@ -263,7 +256,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_DEV_TOOLS: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
if (_views.contains(wv)) {
|
||||
WebviewWindow *w = _views[wv];
|
||||
@@ -282,7 +274,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
case COMMAND_MIN_WIN:
|
||||
case COMMAND_SHOW_NORMAL_WIN:
|
||||
{
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
if (_views.contains(wv)) {
|
||||
WebviewWindow *w = _views[wv];
|
||||
@@ -308,7 +299,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
break;
|
||||
case COMMAND_WINDOW_STATUS:
|
||||
{
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
window_state_t ws = window_state_t::invalid;
|
||||
if (_views.contains(wv)) {
|
||||
@@ -336,7 +326,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_MOVE: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
int x = cmd->args[1].toInt();
|
||||
int y = cmd->args[2].toInt();
|
||||
@@ -345,7 +334,7 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
int move_count = w->moveCount();
|
||||
w->move(x, y);
|
||||
while (w->moveCount() == move_count) {
|
||||
doEvents();
|
||||
_app->processEvents();
|
||||
}
|
||||
cmd->result = true;
|
||||
} else {
|
||||
@@ -355,7 +344,6 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
}
|
||||
break;
|
||||
case COMMAND_RESIZE: {
|
||||
doEvents();
|
||||
int wv = cmd->args[0].toInt();
|
||||
int width = cmd->args[1].toInt();
|
||||
int height = cmd->args[2].toInt();
|
||||
@@ -364,7 +352,7 @@ void Rktwebview_qt::processCommand(Command *cmd)
|
||||
int resize_count = w->resizeCount();
|
||||
w->resize(width, height);
|
||||
while (w->resizeCount() == resize_count) {
|
||||
doEvents();
|
||||
_app->processEvents();
|
||||
}
|
||||
cmd->result = true;
|
||||
} else {
|
||||
@@ -652,6 +640,11 @@ window_state_t Rktwebview_qt::rktWindowState(rktwebview_t w)
|
||||
return ws;
|
||||
}
|
||||
|
||||
int Rktwebview_qt::openWindows()
|
||||
{
|
||||
return _views.size();
|
||||
}
|
||||
|
||||
void Rktwebview_qt::rktQuit()
|
||||
{
|
||||
Command c(COMMAND_QUIT);
|
||||
@@ -730,9 +723,7 @@ result_t Rktwebview_qt::rktChooseDir(rktwebview_t w, const char *title, const ch
|
||||
c.args.push_back(s_base_dir);
|
||||
|
||||
postCommand(&c);
|
||||
while(!c.done) {
|
||||
doEvents();
|
||||
}
|
||||
while(!c.done) { doEvents(); }
|
||||
|
||||
bool r = c.result.toBool();
|
||||
return r ? result_t::oke : result_t::resize_failed;
|
||||
@@ -750,9 +741,7 @@ result_t Rktwebview_qt::rktFileOpen(rktwebview_t w, const char *title, const cha
|
||||
c.args.push_back(s_pe);
|
||||
|
||||
postCommand(&c);
|
||||
while(!c.done) {
|
||||
doEvents();
|
||||
}
|
||||
while(!c.done) { doEvents(); }
|
||||
|
||||
bool r = c.result.toBool();
|
||||
return r ? result_t::oke : result_t::resize_failed;
|
||||
@@ -770,9 +759,7 @@ result_t Rktwebview_qt::rktFileSave(rktwebview_t w, const char *title, const cha
|
||||
c.args.push_back(s_pe);
|
||||
|
||||
postCommand(&c);
|
||||
while(!c.done) {
|
||||
doEvents();
|
||||
}
|
||||
while(!c.done) { doEvents(); }
|
||||
|
||||
bool r = c.result.toBool();
|
||||
return r ? result_t::oke : result_t::resize_failed;
|
||||
@@ -859,9 +846,7 @@ result_t Rktwebview_qt::rktMessageBox(rktwebview_t w, const char *title, const c
|
||||
|
||||
postCommand(&c);
|
||||
|
||||
while(!c.done) {
|
||||
doEvents();
|
||||
}
|
||||
while(!c.done) { doEvents(); }
|
||||
|
||||
bool r = c.result.toBool();
|
||||
return r ? result_t::oke : result_t::failed;
|
||||
|
||||
Reference in New Issue
Block a user