summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-03-29 16:12:39 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2016-03-29 16:12:45 +0200
commitee4c1b91def347f8f16395585b46e20aebdb2f7b (patch)
tree12848e6db961313f53db31359eeffbecc85f8a3f
parentf94520d69da7701d0e82fccbe06b16e6c022bc23 (diff)
parent04b75569f36eec14662505a08bf8c1d565cb10fe (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
-rw-r--r--config.tests/language/main.cpp9
-rw-r--r--examples/serialbus/modbus/adueditor/mainwindow.cpp5
2 files changed, 7 insertions, 7 deletions
diff --git a/config.tests/language/main.cpp b/config.tests/language/main.cpp
index dc57aa8..1d6732b 100644
--- a/config.tests/language/main.cpp
+++ b/config.tests/language/main.cpp
@@ -97,11 +97,10 @@ int total(int a, int i) { return a + i; }
int main(int /*argc*/, char** /*argv*/)
{
- // unique_ptr and nullptr
- std::unique_ptr<Test> t = nullptr;
-
- // make_unique and delegating ctor
- t = std::make_unique<Test>(155);
+ // nullptr
+ Test *t = nullptr;
+ Test stackT(155);
+ t = &stackT;
// variadics
t->setValues(1, 2, 3, 4, 5);
diff --git a/examples/serialbus/modbus/adueditor/mainwindow.cpp b/examples/serialbus/modbus/adueditor/mainwindow.cpp
index 171d79c..3b54be8 100644
--- a/examples/serialbus/modbus/adueditor/mainwindow.cpp
+++ b/examples/serialbus/modbus/adueditor/mainwindow.cpp
@@ -115,8 +115,9 @@ void MainWindow::on_sendButton_clicked()
pduData[0]), pduData.mid(1)), address);
} else {
qDebug() << "Send: Sending PDU with predefined function code.";
- reply = m_device->sendRawRequest(QModbusRequest(QModbusRequest::FunctionCode((isSerial
- ? fcSerialDrop : fcTcpDrop)->currentIndex()), pduData), address);
+ quint16 fc = (isSerial ? fcSerialDrop : fcTcpDrop)->currentText().left(4).toShort(0, 16);
+ reply = m_device->sendRawRequest(QModbusRequest(QModbusRequest::FunctionCode(fc), pduData),
+ address);
}
if (reply) {