lemanhtrung / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

easy compatibility to 4.4.2 #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
from file: qextserialenumerator_unix.cpp:50

change
portNameList.append(dir.entryList(portNamePrefixes, (QDir::System | 
QDir::Files), QDir::Name));

to

QStringList toappend = dir.entryList(portNamePrefixes, (QDir::System | 
QDir::Files), QDir::Name);
    for(int i=0; i<toappend.size(); i++)
        portNameList.append(toappend.at(i));
or to

QStringList toappend = dir.entryList(portNamePrefixes, (QDir::System | 
QDir::Files), QDir::Name);
while (toappend.hasNext())
   portNameList.append(toappend.at(i));

Original issue reported on code.google.com by prostoRo...@gmail.com on 29 Mar 2010 at 11:29

GoogleCodeExporter commented 9 years ago
Can you share the errors you're getting?  Need more context to justify a change.

Original comment by lst...@gmail.com on 4 Apr 2010 at 5:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
from Qt docs
"void QList::append ( const QList<T> & value )
....
This function was introduced in Qt 4.5."
The compiler cannot find a class method void QList::append ( const QList<T> & 
value ) in 
Qt version < 4.5

Original comment by prostoRo...@gmail.com on 13 Apr 2010 at 7:29

GoogleCodeExporter commented 9 years ago
OR 
portNameList += dir.entryList(portNamePrefixes, (QDir::System | QDir::Files), 
QDir::Name));

Original comment by prostoRo...@gmail.com on 20 Jul 2010 at 5:19

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 6:34