Fix for Windows compile

widgets
Phil Taylor 2023-05-26 23:21:54 +01:00
rodzic 6915d0d575
commit 69b643cf18
2 zmienionych plików z 13 dodań i 14 usunięć

Wyświetl plik

@ -1527,12 +1527,12 @@ void wfmain::setSerialDevicesUI()
int vspCount=0; int vspCount=0;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
ui->vspCombo->addItem(QString("None"), i++); // i=0 when this is run vspList.append(QString("None")); // i=0 when this is run
vspData.append(vspCount);
foreach(const QSerialPortInfo & serialPortInfo, QSerialPortInfo::availablePorts()) foreach(const QSerialPortInfo & serialPortInfo, QSerialPortInfo::availablePorts())
{ {
ui->vspCombo->addItem(serialPortInfo.portName()); vspList.append(serialPortInfo.portName());
vspList.append(serialPortInfo.portName(), vspCount);
vspData.append(vspCount); vspData.append(vspCount);
vspCount++; vspCount++;
} }

Wyświetl plik

@ -18,7 +18,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="mainTab"> <widget class="QWidget" name="mainTab">
<attribute name="title"> <attribute name="title">
@ -2189,8 +2189,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>818</width> <width>453</width>
<height>324</height> <height>235</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
@ -4171,7 +4171,6 @@
<widget class="QPushButton" name="exitBtn"> <widget class="QPushButton" name="exitBtn">
<property name="font"> <property name="font">
<font> <font>
<weight>50</weight>
<bold>false</bold> <bold>false</bold>
</font> </font>
</property> </property>
@ -4191,13 +4190,19 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1042</width> <width>1042</width>
<height>21</height> <height>20</height>
</rect> </rect>
</property> </property>
</widget> </widget>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<customwidgets> <customwidgets>
<customwidget>
<class>QLedLabel</class>
<extends>QWidget</extends>
<header location="global">qledlabel.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>QCustomPlot</class> <class>QCustomPlot</class>
<container>1</container> <container>1</container>
@ -4208,12 +4213,6 @@
<header>meter.h</header> <header>meter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>QLedLabel</class>
<extends>QWidget</extends>
<header location="global">qledlabel.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections/> <connections/>