summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2012-02-03 17:09:33 +0100
committerJonathan Bauer2012-02-03 17:09:33 +0100
commit45af1710d08d9896468390a21f4e0a199c7573e5 (patch)
tree1507db0ad3b97fa350175238e9edd7fa997ac1d2
parentsysInfo gets interface name for MAC adress from networkdiscovery (diff)
downloadfbgui-45af1710d08d9896468390a21f4e0a199c7573e5.tar.gz
fbgui-45af1710d08d9896468390a21f4e0a199c7573e5.tar.xz
fbgui-45af1710d08d9896468390a21f4e0a199c7573e5.zip
minor changes
-rw-r--r--src/fbgui/agui.cpp6
-rw-r--r--src/fbgui/console.cpp8
-rw-r--r--src/fbgui/console.h6
-rw-r--r--src/fbgui/javascriptinterface.cpp13
-rw-r--r--src/fbgui/javascriptinterface.h2
-rw-r--r--src/fbgui/main.cpp5
-rw-r--r--src/fbgui/ndgui.cpp11
-rwxr-xr-xtestApp.sh2
8 files changed, 15 insertions, 38 deletions
diff --git a/src/fbgui/agui.cpp b/src/fbgui/agui.cpp
index 7759800..3f2fd68 100644
--- a/src/fbgui/agui.cpp
+++ b/src/fbgui/agui.cpp
@@ -40,13 +40,11 @@ agui::~agui() {
void agui::setupLayout() {
// setup layout of the gui: debug split or browser
_webView = new QWebView(this);
- _webView->setContextMenuPolicy(Qt::NoContextMenu); // if this does not work try Qt::CustomContextMenu
+ //_webView->setContextMenuPolicy(Qt::NoContextMenu); // if this does not work try Qt::CustomContextMenu
_webView->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
- LOG4CXX_DEBUG(aguiCoreLogger, "Debug Mode: " << debugMode);
if (debugMode > -1) {
// split main window in browser & debug console
- //createDebugConsole();
- console* debugConsole = new console(this);
+ Console* debugConsole = new Console(this);
QSplitter* _splitter = new QSplitter(Qt::Vertical, this);
_splitter->addWidget(_webView);
_splitter->addWidget(debugConsole);
diff --git a/src/fbgui/console.cpp b/src/fbgui/console.cpp
index ffd425f..b4fcddf 100644
--- a/src/fbgui/console.cpp
+++ b/src/fbgui/console.cpp
@@ -7,7 +7,7 @@
#include "console.h"
-console::console(QMainWindow* parent) :
+Console::Console(QMainWindow* parent) :
QTextEdit(parent) {
setWindowFlags(Qt::FramelessWindowHint);
@@ -39,12 +39,12 @@ console::console(QMainWindow* parent) :
}
}
-console::~console() {
+Console::~Console() {
delete _logFile;
delete _logFileIn;
}
-void console::refresh(const QString& fileName) {
+void Console::refresh(const QString& fileName) {
if (fileName == logFilePath) {
while (!_logFileIn->atEnd()) {
QString line = _logFileIn->readLine();
@@ -55,6 +55,6 @@ void console::refresh(const QString& fileName) {
}
}
-void console::toggle() {
+void Console::toggle() {
(this->isVisible()) ? this->hide() : this->show();
}
diff --git a/src/fbgui/console.h b/src/fbgui/console.h
index cb6dd34..bc6ec50 100644
--- a/src/fbgui/console.h
+++ b/src/fbgui/console.h
@@ -13,13 +13,13 @@
extern QString logFilePath;
-class console : public QTextEdit
+class Console : public QTextEdit
{
Q_OBJECT
public:
- console(QMainWindow* parent = 0);
- virtual ~console();
+ Console(QMainWindow* parent = 0);
+ virtual ~Console();
private:
QFile* _logFile;
diff --git a/src/fbgui/javascriptinterface.cpp b/src/fbgui/javascriptinterface.cpp
index 3afd3f6..8260fab 100644
--- a/src/fbgui/javascriptinterface.cpp
+++ b/src/fbgui/javascriptinterface.cpp
@@ -229,16 +229,3 @@ void JavascriptInterface::callbackOnFinished() {
QString code = QString("\%1").arg(_callbackOnDownloadsFinished);
_parent->evaluateJavaScript(code);
}
-//-------------------------------------------------------------------------------------------------------
-/**
- * This method triggers the URL load *FOR DEBUGGING/TESTING PURPOSES*
-
- */
-void JavascriptInterface::trigger() {
- QFile file(fileToTriggerURL);
- if (file.open(QIODevice::WriteOnly)) {
- file.write("data\n");
- LOG4CXX_DEBUG(jsiLogger, "*trigger watcher*");
- }
- file.close();
-}
diff --git a/src/fbgui/javascriptinterface.h b/src/fbgui/javascriptinterface.h
index 5d45964..b15c134 100644
--- a/src/fbgui/javascriptinterface.h
+++ b/src/fbgui/javascriptinterface.h
@@ -66,8 +66,6 @@ public slots:
void downloadInfo(const QString& filename, const double& filesize);
void notify(const QString& msg);
- // functions to help test functionality
- void trigger();
};
#endif // JAVASCRIPTINTERFACE_H_
diff --git a/src/fbgui/main.cpp b/src/fbgui/main.cpp
index 6286b9f..d379c1e 100644
--- a/src/fbgui/main.cpp
+++ b/src/fbgui/main.cpp
@@ -61,6 +61,8 @@ int main(int argc, char *argv[]) {
app.setApplicationName("prebootGUI");
binPath = QApplication::applicationDirPath();
+
+
QTranslator translator;
translator.load(":" + QLocale::system().name());
app.installTranslator(&translator);
@@ -290,6 +292,9 @@ int main(int argc, char *argv[]) {
}
LOG4CXX_DEBUG(logger, "*******************************************");
+ //if (QSslSocket::supportsSsl())
+ // LOG4CXX_DEBUG(logger, "SUPPORT SSL!");
+
// set invisible cursor
//QWSServer::instance()->setCursorVisible(false);
diff --git a/src/fbgui/ndgui.cpp b/src/fbgui/ndgui.cpp
index 67bfa79..a95d884 100644
--- a/src/fbgui/ndgui.cpp
+++ b/src/fbgui/ndgui.cpp
@@ -11,7 +11,6 @@
#include "ndgui.h"
-
#include <log4cxx/logger.h>
#include "qlog4cxx.h"
@@ -41,11 +40,8 @@ ndgui::ndgui() :
*/
ndgui::~ndgui() {
- //delete _debugConsole;
- //delete _toggleDebugConsole;
delete _allowUserChoice;
delete _tryAgain;
- //delete _webView;
delete _networkDiscovery;
}
@@ -181,8 +177,6 @@ void ndgui::handleConnectionEstablished(QString ifName) {
_ifNameList.append(ifName);
}
-
-
/**
* @brief determines if we continue the boot sequence or if we show the chooseInterface or abortBoot dialog
*
@@ -270,11 +264,6 @@ QString ndgui::readLogFile() {
void ndgui::tryAgain() {
LOG4CXX_DEBUG(ndLogger, " try again ");
_networkDiscovery->prepareTryAgain();
- if(debugMode > -1) {
- //delete _splitter;
- //delete _debugConsole;
- //delete _toggleDebugConsole;
- }
delete _allowUserChoice;
delete _tryAgain;
//delete _webView;
diff --git a/testApp.sh b/testApp.sh
index 8a4843a..790637e 100755
--- a/testApp.sh
+++ b/testApp.sh
@@ -13,7 +13,7 @@
# Note: all path are expected to be absolute.
#
# Adapt these to your own system.
-QT_VERSION=Qt-4.7.2
+QT_VERSION=Qt-4.8.0
#PATH_TO_FBGUI_BUILD=/home/joe/fbgui/build
PATH_TO_FBGUI_BUILD=/home/joe/workspace/fbgui