summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/serialconfigwidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/serialconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/serialconfigwidget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp
index 1e97a24..bd0312a 100644
--- a/noncore/apps/opie-console/serialconfigwidget.cpp
+++ b/noncore/apps/opie-console/serialconfigwidget.cpp
@@ -87,25 +87,26 @@ void SerialConfigWidget::load( const Profile& prof ) {
87 } 87 }
88 88
89 if ( prof.readEntry("Device").isEmpty() ) return; 89 if ( prof.readEntry("Device").isEmpty() ) return;
90 setCurrent( prof.readEntry("Device"), m_deviceCmb ); 90 setCurrent( prof.readEntry("Device"), m_deviceCmb );
91 91
92} 92}
93/* 93/*
94 * save speed, 94 * save speed,
95 * flow, 95 * flow,
96 * parity 96 * parity
97 */ 97 */
98void SerialConfigWidget::save( Profile& prof ) { 98void SerialConfigWidget::save( Profile& prof ) {
99 int flow, parity, speed; 99 int flow, parity, speed ;
100 flow = parity = speed = 0;
100 prof.writeEntry("Device", m_deviceCmb->currentText() ); 101 prof.writeEntry("Device", m_deviceCmb->currentText() );
101 102
102 switch( m_base->flow() ) { 103 switch( m_base->flow() ) {
103 case IOLayerBase::None: 104 case IOLayerBase::None:
104 flow = 0; 105 flow = 0;
105 break; 106 break;
106 case IOLayerBase::Software: 107 case IOLayerBase::Software:
107 flow = 2; 108 flow = 2;
108 break; 109 break;
109 case IOLayerBase::Hardware: 110 case IOLayerBase::Hardware:
110 flow = 1; 111 flow = 1;
111 break; 112 break;
@@ -127,21 +128,22 @@ void SerialConfigWidget::save( Profile& prof ) {
127 case IOLayerBase::Baud_115200: 128 case IOLayerBase::Baud_115200:
128 speed = 115200; 129 speed = 115200;
129 break; 130 break;
130 case IOLayerBase::Baud_57600: 131 case IOLayerBase::Baud_57600:
131 speed = 57600; 132 speed = 57600;
132 break; 133 break;
133 case IOLayerBase::Baud_38400: 134 case IOLayerBase::Baud_38400:
134 speed = 38400; 135 speed = 38400;
135 break; 136 break;
136 case IOLayerBase::Baud_19200: 137 case IOLayerBase::Baud_19200:
137 speed = 19200; 138 speed = 19200;
138 break; 139 break;
140 default:
139 case IOLayerBase::Baud_9600: 141 case IOLayerBase::Baud_9600:
140 speed = 9600; 142 speed = 9600;
141 break; 143 break;
142 } 144 }
143 145
144 prof.writeEntry("Flow", flow); 146 prof.writeEntry("Flow", flow);
145 prof.writeEntry("Parity", parity); 147 prof.writeEntry("Parity", parity);
146 prof.writeEntry("Speed", speed); 148 prof.writeEntry("Speed", speed);
147} 149}