From 273b9d60502eb5b6c13cc773403fd51d9c7adf75 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Fri, 25 Jun 2010 05:14:13 +0000 Subject: Theme Editor: Fixed some compiler warnings and a segfault. Got some basic text rendering working (only with plaintext elements, no font support yet) as well as Viewport background color support git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27126 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/gui/devicestate.cpp | 4 ++-- utils/themeeditor/gui/editorwindow.cpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'utils/themeeditor/gui') diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp index ef9d666eb2..3933926a48 100644 --- a/utils/themeeditor/gui/devicestate.cpp +++ b/utils/themeeditor/gui/devicestate.cpp @@ -44,7 +44,7 @@ DeviceState::DeviceState(QWidget *parent) : this->setLayout(layout); /* Loading the tabs */ - QScrollArea* currentArea; + QScrollArea* currentArea = 0; QHBoxLayout* subLayout; QWidget* panel; @@ -176,7 +176,7 @@ DeviceState::DeviceState(QWidget *parent) : { elements = elements[1].trimmed().split(","); - int defIndex; + int defIndex = 0; QComboBox* temp = new QComboBox(currentArea); for(int i = 0; i < elements.count(); i++) { diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index 1aec46a7cc..81d05c8ed4 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp @@ -31,7 +31,8 @@ EditorWindow::EditorWindow(QWidget *parent) : QMainWindow(parent), - ui(new Ui::EditorWindow) + ui(new Ui::EditorWindow), + parseTreeSelection(0) { ui->setupUi(this); prefs = new PreferencesDialog(this); @@ -438,8 +439,6 @@ void EditorWindow::updateCurrent() void EditorWindow::lineChanged(int line) { ui->parseTree->collapseAll(); - if(parseTreeSelection) - parseTreeSelection->deleteLater(); ParseTreeModel* model = dynamic_cast (ui->parseTree->model()); parseTreeSelection = new QItemSelectionModel(model); -- cgit v1.2.3