author | harlekin <harlekin> | 2004-03-02 20:29:03 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-03-02 20:29:03 (UTC) |
commit | 9631067183b4cafa2ea07d2202bf88f4d42c35e2 (patch) (unidiff) | |
tree | 148a780ed518c978770d69ea93a08a3cb85d46b8 | |
parent | 914b5cd04a59c8569c14d9afedd9eeb1796e2db7 (diff) | |
download | opie-9631067183b4cafa2ea07d2202bf88f4d42c35e2.zip opie-9631067183b4cafa2ea07d2202bf88f4d42c35e2.tar.gz opie-9631067183b4cafa2ea07d2202bf88f4d42c35e2.tar.bz2 |
libopie1->libopie2, segfaulting
-rw-r--r-- | core/settings/light-and-power/light-and-power.pro | 4 | ||||
-rw-r--r-- | core/settings/light-and-power/light.cpp | 5 | ||||
-rw-r--r-- | core/settings/light-and-power/light.h | 2 | ||||
-rw-r--r-- | core/settings/light-and-power/main.cpp | 2 | ||||
-rw-r--r-- | core/settings/light-and-power/sensor.cpp | 31 | ||||
-rw-r--r-- | core/settings/light-and-power/sensor.h | 2 |
6 files changed, 24 insertions, 22 deletions
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 @@ | |||
1 | CONFIG += qt warn_on release quick-app | 1 | CONFIG += qt warn_on debug quick-app |
2 | HEADERS = light.h sensor.h calibration.h | 2 | HEADERS = light.h sensor.h calibration.h |
3 | SOURCES = light.cpp main.cpp sensor.cpp calibration.cpp | 3 | SOURCES = light.cpp main.cpp sensor.cpp calibration.cpp |
4 | INTERFACES= lightsettingsbase.ui sensorbase.ui | 4 | INTERFACES= lightsettingsbase.ui sensorbase.ui |
5 | INCLUDEPATH += $(OPIEDIR)/include | 5 | INCLUDEPATH += $(OPIEDIR)/include |
6 | DEPENDPATH+= ../$(OPIEDIR)/include | 6 | DEPENDPATH+= ../$(OPIEDIR)/include |
7 | LIBS += -lqpe -lopie | 7 | LIBS += -lqpe -lopiecore2 |
8 | 8 | ||
9 | TARGET = light-and-power | 9 | TARGET = light-and-power |
10 | 10 | ||
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 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "light.h" | 29 | #include "light.h" |
30 | #include "sensor.h" | ||
31 | |||
32 | #include <opie2/odevice.h> | ||
30 | 33 | ||
31 | #include <qpe/config.h> | 34 | #include <qpe/config.h> |
32 | #include <qpe/power.h> | 35 | #include <qpe/power.h> |
@@ -43,9 +46,7 @@ | |||
43 | #include <qgroupbox.h> | 46 | #include <qgroupbox.h> |
44 | #include <qcombobox.h> | 47 | #include <qcombobox.h> |
45 | 48 | ||
46 | #include <opie/odevice.h> | ||
47 | 49 | ||
48 | #include "sensor.h" | ||
49 | 50 | ||
50 | using namespace Opie; | 51 | using namespace Opie; |
51 | 52 | ||
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 @@ | |||
28 | #ifndef __LIGHT_H__ | 28 | #ifndef __LIGHT_H__ |
29 | #define __LIGHT_H__ | 29 | #define __LIGHT_H__ |
30 | 30 | ||
31 | #include "lightsettingsbase.h" | ||
31 | 32 | ||
32 | #include <qstringlist.h> | 33 | #include <qstringlist.h> |
33 | #include <qlistbox.h> | 34 | #include <qlistbox.h> |
34 | #include "lightsettingsbase.h" | ||
35 | 35 | ||
36 | class QTimer; | 36 | class QTimer; |
37 | 37 | ||
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 @@ | |||
20 | 20 | ||
21 | #include "light.h" | 21 | #include "light.h" |
22 | 22 | ||
23 | #include <opie/oapplicationfactory.h> | 23 | #include <opie2/oapplicationfactory.h> |
24 | 24 | ||
25 | 25 | ||
26 | OPIE_EXPORT_APP( OApplicationFactory<LightSettings> ) | 26 | OPIE_EXPORT_APP( OApplicationFactory<LightSettings> ) |
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 @@ | |||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
@@ -25,28 +25,29 @@ | |||
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | |||
29 | #include "calibration.h" | ||
30 | #include "sensor.h" | ||
31 | |||
32 | #include <opie2/odevice.h> | ||
33 | |||
28 | #include <qlayout.h> | 34 | #include <qlayout.h> |
29 | #include <qslider.h> | 35 | #include <qslider.h> |
30 | #include <qspinbox.h> | 36 | #include <qspinbox.h> |
31 | 37 | ||
32 | #include <opie/odevice.h> | ||
33 | |||
34 | using namespace Opie; | 38 | using namespace Opie; |
35 | 39 | ||
36 | #include "calibration.h" | ||
37 | #include "sensor.h" | ||
38 | |||
39 | Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) | 40 | Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) |
40 | : SensorBase ( parent, name, true, WStyle_ContextHelp ), m_params ( params ) | 41 | : SensorBase ( parent, name, true, WStyle_ContextHelp ), m_params ( params ) |
41 | { | 42 | { |
42 | int steps = 12; | 43 | int steps = 12; |
43 | int inter = 2; | 44 | int inter = 2; |
44 | 45 | ||
45 | int smin = 40; | 46 | int smin = 40; |
46 | int smax = 215; | 47 | int smax = 215; |
47 | int lmin = 1; | 48 | int lmin = 1; |
48 | int lmax = 255; | 49 | int lmax = 255; |
49 | 50 | ||
50 | switch ( params. count ( )) { | 51 | switch ( params. count ( )) { |
51 | case 6: lmax = params [5]. toInt ( ); | 52 | case 6: lmax = params [5]. toInt ( ); |
52 | case 5: lmin = params [4]. toInt ( ); | 53 | case 5: lmin = params [4]. toInt ( ); |
@@ -58,27 +59,27 @@ Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) | |||
58 | 59 | ||
59 | int xscale = ODevice::inst ( )-> lightSensorResolution ( ); | 60 | int xscale = ODevice::inst ( )-> lightSensorResolution ( ); |
60 | int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); | 61 | int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); |
61 | 62 | ||
62 | QVBoxLayout *lay = new QVBoxLayout ( frame ); | 63 | QVBoxLayout *lay = new QVBoxLayout ( frame ); |
63 | lay-> setMargin ( 2 ); | 64 | lay-> setMargin ( 2 ); |
64 | m_calib = new Calibration ( frame ); | 65 | m_calib = new Calibration ( frame ); |
65 | lay-> add ( m_calib ); | 66 | lay-> add ( m_calib ); |
66 | 67 | ||
67 | m_calib-> setScale ( QSize ( xscale, yscale )); | 68 | m_calib-> setScale ( QSize ( xscale, yscale )); |
68 | m_calib-> setLineSteps ( steps ); | 69 | m_calib-> setLineSteps ( steps ); |
69 | m_calib-> setInterval ( inter ); | 70 | m_calib-> setInterval ( inter ); |
70 | m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 )); | 71 | m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 )); |
71 | m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 )); | 72 | m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 )); |
72 | 73 | ||
73 | interval-> setValue ( inter ); | 74 | interval-> setValue ( inter ); |
74 | linesteps-> setValue ( steps ); | 75 | linesteps-> setValue ( steps ); |
75 | 76 | ||
76 | connect ( interval, SIGNAL( valueChanged(int)), m_calib, SLOT( setInterval(int))); | 77 | connect ( interval, SIGNAL( valueChanged(int)), m_calib, SLOT( setInterval(int))); |
77 | connect ( linesteps, SIGNAL( valueChanged(int)), m_calib, SLOT( setLineSteps(int))); | 78 | connect ( linesteps, SIGNAL( valueChanged(int)), m_calib, SLOT( setLineSteps(int))); |
78 | 79 | ||
79 | connect ( m_calib, SIGNAL( startPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); | 80 | connect ( m_calib, SIGNAL( startPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); |
80 | connect ( m_calib, SIGNAL( endPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); | 81 | connect ( m_calib, SIGNAL( endPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); |
81 | } | 82 | } |
82 | 83 | ||
83 | void Sensor::accept ( ) | 84 | void Sensor::accept ( ) |
84 | { | 85 | { |
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: | |||
52 | Calibration *m_calib; | 52 | Calibration *m_calib; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | #endif \ No newline at end of file | 55 | #endif |