Skip to content

Commit d9a3a48

Browse files
committed
maximized new windows
1 parent 4867cba commit d9a3a48

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ http://doc.qt.io/qt-5/qtglobal.html
9898
http://doc.qt.io/qt-5/qmake-test-function-reference.html#packagesexist-packages
9999
http://doc.qt.io/qt-5/qhash.html
100100
http://doc.qt.io/qt-5/qhash-iterator.html
101+
http://doc.qt.io/qt-5/qdesktopwidget.html
101102
http://doc.qt.io/archives/qt-5.5/qwebview.html
102103
http://doc.qt.io/archives/qt-5.5/qurlquery.html
103104

src/peb.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#ifndef Q_OS_WIN
2727
#if ADMIN_PRIVILEGES_CHECK == 1 or PERL_DEBUGGER_GUI == 1
28-
#include <unistd.h> // for geteuid() and isatty()
28+
#include <unistd.h> // geteuid(); isatty();
2929
#endif
3030
#endif
3131

@@ -417,8 +417,8 @@ int main(int argc, char **argv)
417417
// LOG BASIC PROGRAM INFORMATION AND SETTINGS:
418418
// ==============================
419419
qInfo() << application.applicationName().toLatin1().constData()
420-
<< application.applicationVersion().toLatin1().constData()
421-
<< "started.";
420+
<< application.applicationVersion().toLatin1().constData()
421+
<< "started.";
422422
qInfo() << "Qt version:" << QT_VERSION_STR;
423423
qInfo() << "Executable:" << application.applicationFilePath();
424424
qInfo() << "PID:" << application.applicationPid();

src/peb.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ class QCustomNetworkReply : public QNetworkReply
191191
Q_OBJECT
192192

193193
public:
194-
195194
QCustomNetworkReply(
196195
const QUrl &url, const QString &data, const QString &mime);
197196
~QCustomNetworkReply();
@@ -1239,7 +1238,6 @@ public slots:
12391238
}
12401239

12411240
private:
1242-
QWebView *webViewWidget;
12431241
QWebFrame *lastTargetFrame;
12441242

12451243
QString pageStatus;
@@ -1538,9 +1536,8 @@ public slots:
15381536

15391537
void qDisplayScriptErrorsSlot(QString errors)
15401538
{
1541-
errorsWindow = new QWebViewWidget();
1539+
QWebViewWidget *errorsWindow = new QWebViewWidget();
15421540
errorsWindow->setHtml(errors, QUrl(PSEUDO_DOMAIN));
1543-
errorsWindow->adjustSize();
15441541
errorsWindow->setFocus();
15451542
errorsWindow->show();
15461543
}
@@ -1592,7 +1589,8 @@ public slots:
15921589

15931590
QWebView *window = new QWebViewWidget();
15941591
window->setHtml(loadingContents);
1595-
window->show();
1592+
window->setGeometry(qApp->desktop()->availableGeometry());
1593+
window->showMaximized();
15961594

15971595
qInfo() << "New window opened.";
15981596

@@ -1601,8 +1599,6 @@ public slots:
16011599

16021600
private:
16031601
QPage *mainPage;
1604-
QWebView *newWindow;
1605-
QWebView *errorsWindow;
16061602

16071603
bool windowCloseRequested;
16081604
};

0 commit comments

Comments
 (0)