From 9631067183b4cafa2ea07d2202bf88f4d42c35e2 Mon Sep 17 00:00:00 2001 From: harlekin Date: Tue, 02 Mar 2004 20:29:03 +0000 Subject: libopie1->libopie2, segfaulting --- diff --git a/core/settings/light-and-power/light-and-power.pro b/core/settings/light-and-power/light-and-power.pro index 928976a..bc8ba4b 100644 --- a/core/settings/light-and-power/light-and-power.pro +++ b/core/settings/light-and-power/light-and-power.pro @@ -1,10 +1,10 @@ -CONFIG += qt warn_on release quick-app +CONFIG += qt warn_on debug quick-app HEADERS = light.h sensor.h calibration.h SOURCES = light.cpp main.cpp sensor.cpp calibration.cpp INTERFACES = lightsettingsbase.ui sensorbase.ui INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include -LIBS += -lqpe -lopie +LIBS += -lqpe -lopiecore2 TARGET = light-and-power diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index ce45836..09fb767 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -27,6 +27,9 @@ */ #include "light.h" +#include "sensor.h" + +#include #include #include @@ -43,9 +46,7 @@ #include #include -#include -#include "sensor.h" using namespace Opie; diff --git a/core/settings/light-and-power/light.h b/core/settings/light-and-power/light.h index 2167817..9077a09 100644 --- a/core/settings/light-and-power/light.h +++ b/core/settings/light-and-power/light.h @@ -28,10 +28,10 @@ #ifndef __LIGHT_H__ #define __LIGHT_H__ +#include "lightsettingsbase.h" #include #include -#include "lightsettingsbase.h" class QTimer; diff --git a/core/settings/light-and-power/main.cpp b/core/settings/light-and-power/main.cpp index cb43ce0..7a47b0b 100644 --- a/core/settings/light-and-power/main.cpp +++ b/core/settings/light-and-power/main.cpp @@ -20,7 +20,7 @@ #include "light.h" -#include +#include OPIE_EXPORT_APP( OApplicationFactory ) diff --git a/core/settings/light-and-power/sensor.cpp b/core/settings/light-and-power/sensor.cpp index 013e655..53c3aed 100644 --- a/core/settings/light-and-power/sensor.cpp +++ b/core/settings/light-and-power/sensor.cpp @@ -16,7 +16,7 @@     =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A   _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General ..}^=.=       =       ; Public License for more details. -++=   -.     .`     .: +++=   -.     .`     .:  :     =  ...= . :.=- You should have received a copy of the GNU  -.   .:....=;==+<; General Public License along with this file;   -_. . .   )=.  = see the file COPYING. If not, write to the @@ -25,28 +25,29 @@ Boston, MA 02111-1307, USA. */ + +#include "calibration.h" +#include "sensor.h" + +#include + #include #include #include -#include - using namespace Opie; -#include "calibration.h" -#include "sensor.h" - Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) : SensorBase ( parent, name, true, WStyle_ContextHelp ), m_params ( params ) { - int steps = 12; + int steps = 12; int inter = 2; - + int smin = 40; int smax = 215; int lmin = 1; int lmax = 255; - + switch ( params. count ( )) { case 6: lmax = params [5]. toInt ( ); case 5: lmin = params [4]. toInt ( ); @@ -58,27 +59,27 @@ Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) int xscale = ODevice::inst ( )-> lightSensorResolution ( ); int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); - + QVBoxLayout *lay = new QVBoxLayout ( frame ); lay-> setMargin ( 2 ); m_calib = new Calibration ( frame ); - lay-> add ( m_calib ); + lay-> add ( m_calib ); m_calib-> setScale ( QSize ( xscale, yscale )); m_calib-> setLineSteps ( steps ); m_calib-> setInterval ( inter ); m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 )); m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 )); - + interval-> setValue ( inter ); linesteps-> setValue ( steps ); - + connect ( interval, SIGNAL( valueChanged(int)), m_calib, SLOT( setInterval(int))); connect ( linesteps, SIGNAL( valueChanged(int)), m_calib, SLOT( setLineSteps(int))); - + connect ( m_calib, SIGNAL( startPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); connect ( m_calib, SIGNAL( endPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); -} +} void Sensor::accept ( ) { diff --git a/core/settings/light-and-power/sensor.h b/core/settings/light-and-power/sensor.h index b484519..092ac6c 100644 --- a/core/settings/light-and-power/sensor.h +++ b/core/settings/light-and-power/sensor.h @@ -52,4 +52,4 @@ private: Calibration *m_calib; }; -#endif \ No newline at end of file +#endif -- cgit v0.9.0.2