|
Lines 1-14
Link Here
|
| 1 |
--- qcppdialogimpl.cpp.orig Thu Jun 9 21:43:44 2005 |
1 |
--- qcppdialogimpl.cpp.orig 2008-03-10 17:53:45.000000000 -0500 |
| 2 |
+++ qcppdialogimpl.cpp Thu Jun 9 23:26:47 2005 |
2 |
+++ qcppdialogimpl.cpp 2008-04-15 17:43:27.000000000 -0500 |
| 3 |
@@ -217,11 +217,23 @@ |
3 |
@@ -49,6 +49,7 @@ |
|
|
4 |
#include <sys/time.h> |
| 5 |
#include <sys/types.h> |
| 6 |
#include <sys/select.h> |
| 7 |
+#include <sys/param.h> |
| 8 |
#include <fcntl.h> |
| 9 |
|
| 10 |
void millisleep(int ms) |
| 11 |
@@ -234,11 +235,27 @@ |
| 4 |
bool entryFound=false; |
12 |
bool entryFound=false; |
| 5 |
QStringList devices=settings.readListEntry("/cutecom/AllDevices", &entryFound); |
13 |
QStringList devices=settings.readListEntry("/cutecom/AllDevices", &entryFound); |
| 6 |
if (!entryFound) |
14 |
if (!entryFound) |
| 7 |
+#ifdef __FreeBSD__ |
15 |
+#ifdef __FreeBSD__ |
| 8 |
+#if __FreeBSD_version < 600000 |
16 |
+#if __FreeBSD_version < 600000 |
| 9 |
+ devices<<"/dev/cuaa0"<<"/dev/cuaa1"<<"/dev/cuaa2"<<"/dev/cuaa3"; |
17 |
+ devices<<"/dev/cuaa0"<<"/dev/cuaa1"<<"/dev/cuaa2"<<"/dev/cuaa3"<<"/dev/cuaU0"<<"/dev/cuaU1"; |
| 10 |
+#else |
18 |
+#else |
| 11 |
+ devices<<"/dev/cuad0"<<"/dev/cuad1"<<"/dev/cuad2"<<"/dev/cuad3"; |
19 |
+ devices<<"/dev/cuad0"<<"/dev/cuad1"<<"/dev/cuad2"<<"/dev/cuad3"<<"/dev/cuaU0"<<"/dev/cuaU1"; |
| 12 |
+#endif |
20 |
+#endif |
| 13 |
+#else |
21 |
+#else |
| 14 |
devices<<"/dev/ttyS0"<<"/dev/ttyS1"<<"/dev/ttyS2"<<"/dev/ttyS3"; |
22 |
devices<<"/dev/ttyS0"<<"/dev/ttyS1"<<"/dev/ttyS2"<<"/dev/ttyS3"; |
|
Lines 17-30
Link Here
|
| 17 |
m_deviceCb->insertStringList(devices); |
25 |
m_deviceCb->insertStringList(devices); |
| 18 |
|
26 |
|
| 19 |
+#ifdef __FreeBSD__ |
27 |
+#ifdef __FreeBSD__ |
|
|
28 |
+#if __FreeBSD_version < 600000 |
| 20 |
+ m_deviceCb->setCurrentText(settings.readEntry("/cutecom/CurrentDevice", "/dev/cuaa0")); |
29 |
+ m_deviceCb->setCurrentText(settings.readEntry("/cutecom/CurrentDevice", "/dev/cuaa0")); |
| 21 |
+#else |
30 |
+#else |
|
|
31 |
+ m_deviceCb->setCurrentText(settings.readEntry("/cutecom/CurrentDevice", "/dev/cuad0")); |
| 32 |
+#endif |
| 33 |
+#else |
| 22 |
m_deviceCb->setCurrentText(settings.readEntry("/cutecom/CurrentDevice", "/dev/ttyS0")); |
34 |
m_deviceCb->setCurrentText(settings.readEntry("/cutecom/CurrentDevice", "/dev/ttyS0")); |
| 23 |
+#endif |
35 |
+#endif |
| 24 |
|
36 |
|
| 25 |
QStringList history=settings.readListEntry("/cutecom/History"); |
37 |
QStringList history=settings.readListEntry("/cutecom/History"); |
| 26 |
|
38 |
|
| 27 |
@@ -326,7 +338,7 @@ |
39 |
@@ -350,7 +367,7 @@ |
| 28 |
m_sz->addArgument("sh"); |
40 |
m_sz->addArgument("sh"); |
| 29 |
m_sz->addArgument("-c"); |
41 |
m_sz->addArgument("-c"); |
| 30 |
// QString tmp=QString("sx -vv \"")+filename+"\" < "+m_deviceCb->currentText()+" > "+m_deviceCb->currentText(); |
42 |
// QString tmp=QString("sx -vv \"")+filename+"\" < "+m_deviceCb->currentText()+" > "+m_deviceCb->currentText(); |
|
Lines 33-39
Link Here
|
| 33 |
if (m_protoPb->currentText()=="XModem") |
45 |
if (m_protoPb->currentText()=="XModem") |
| 34 |
tmp+="--xmodem "; |
46 |
tmp+="--xmodem "; |
| 35 |
else if (m_protoPb->currentText()=="YModem") |
47 |
else if (m_protoPb->currentText()=="YModem") |
| 36 |
@@ -445,7 +457,7 @@ |
48 |
@@ -472,7 +489,7 @@ |
| 37 |
|
49 |
|
| 38 |
void QCPPDialogImpl::sendDone() |
50 |
void QCPPDialogImpl::sendDone() |
| 39 |
{ |
51 |
{ |
|
Lines 42-48
Link Here
|
| 42 |
} |
54 |
} |
| 43 |
|
55 |
|
| 44 |
bool QCPPDialogImpl::eventFilter(QObject* watched, QEvent *e) |
56 |
bool QCPPDialogImpl::eventFilter(QObject* watched, QEvent *e) |
| 45 |
@@ -885,15 +897,21 @@ |
57 |
@@ -915,15 +932,21 @@ |
| 46 |
case 230400: |
58 |
case 230400: |
| 47 |
_baud=B230400; |
59 |
_baud=B230400; |
| 48 |
break; |
60 |
break; |