From: Ilkka Tengvall Date: Thu, 7 Oct 2010 18:29:03 +0000 (+0300) Subject: unified the code and cleaned exit status X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=777403c8770d27c302072164b5f9f51be8df0858;hp=8178c572679068828f20f8ee2a41dfe6855ac2f9;p=woller unified the code and cleaned exit status * Made code identical with woller-gui (.cpp+.pro+.h) * Fixed the segfault status at exit by re-ordering deletes in the HostWidget destructor --- diff --git a/woller.cpp b/woller.cpp index f08af4a..ba596e2 100644 --- a/woller.cpp +++ b/woller.cpp @@ -210,10 +210,10 @@ ConfigWidget::ConfigWidget(QWidget *parent, QList *hosts) this->setWindowTitle(tr("Woller Config")); #ifdef Q_WS_MAEMO_5 this->setAttribute(Qt::WA_Maemo5StackedWindow); - this->setWindowFlags(this->windowFlags() | Qt::Window); #else this->setWindowModality(Qt::ApplicationModal); #endif + this->setWindowFlags(this->windowFlags() | Qt::Window); add_host = new QPushButton(tr("&Add Host"), this); edit_host = new QPushButton(tr("&Edit Host"), this); del_host = new QPushButton(tr("&Delete Host"), this); @@ -368,10 +368,10 @@ HostWidget::HostWidget(QWidget *parent, host_s *host) this->setWindowTitle(tr("WOL target details")); #ifdef Q_WS_MAEMO_5 this->setAttribute(Qt::WA_Maemo5StackedWindow); - this->setWindowFlags(this->windowFlags() | Qt::Window); #else this->setWindowModality(Qt::ApplicationModal); #endif + this->setWindowFlags(this->windowFlags() | Qt::Window); vlayout = new QVBoxLayout(this); host_row = new QHBoxLayout; @@ -462,7 +462,6 @@ void HostWidget::ok_sig() HostWidget::~HostWidget() { qDebug() << "host ~widget" << endl; - delete vlayout; delete host_row; delete host_lbl; delete hostname; @@ -475,7 +474,7 @@ HostWidget::~HostWidget() delete button_row; delete cancel; delete ok; - //delete new_host; + delete vlayout; } diff --git a/woller.pro b/woller.pro index 72592b3..cd3db5b 100644 --- a/woller.pro +++ b/woller.pro @@ -1,9 +1,10 @@ -#CONFIG += qt debug CONFIG += qt +#CONFIG += debug QT += network maemo5 { QT += maemo5 } + HEADERS += woller.h SOURCES += woller.cpp main.cpp @@ -14,21 +15,25 @@ unix { } icons.path = $$PREFIX/share/icons/hicolor/scalable/apps icons.files = woller.svg - icons26.path = $$PREFIX/share/icons/hicolor/26x26/apps - icons26.files = icons/26x26/woller.png - icons40.path = $$PREFIX/share/icons/hicolor/40x40/apps - icons40.files = icons/40x40/woller.png - icons64.path = $$PREFIX/share/icons/hicolor/64x64/apps - icons64.files = icons/64x64/woller.png - menues.path = $$PREFIX/share/applications + maemo5 { + icons26.path = $$PREFIX/share/icons/hicolor/26x26/apps + icons26.files = icons/26x26/woller.png + icons40.path = $$PREFIX/share/icons/hicolor/40x40/apps + icons40.files = icons/40x40/woller.png + icons64.path = $$PREFIX/share/icons/hicolor/64x64/apps + icons64.files = icons/64x64/woller.png + menues.path = $$PREFIX/share/applications + menues.path = $$PREFIX/share/applications/hildon + } menues.files = woller.desktop docs.path = $$PREFIX/share/doc/woller docs.files = README.txt target.path = $$PREFIX/bin -} -maemo5 { - menues.path = $$PREFIX/share/applications/hildon + INSTALLS += target icons menues docs + maemo5 { + INSTALLS += icons26 icons40 icons64 + } } -INSTALLS += target icons icons26 icons40 icons64 menues docs +