summaryrefslogtreecommitdiffstats
path: root/tools/runonphone
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-09 04:02:18 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-09 04:02:18 (GMT)
commitec82a2e2c596fd623c58a4a003dd2e7603931993 (patch)
treec2cabcd9f3c2c06269a59ab57d548ddc5c29a275 /tools/runonphone
parent4596db451cd2c53768e42b00a4234e7de2149f39 (diff)
parentd3db719f8dce8abfa81c39f54d0fd58b4e75a1ca (diff)
downloadQt-ec82a2e2c596fd623c58a4a003dd2e7603931993.zip
Qt-ec82a2e2c596fd623c58a4a003dd2e7603931993.tar.gz
Qt-ec82a2e2c596fd623c58a4a003dd2e7603931993.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: (23 commits) Fixed build breakage on S60 3.1 due to audio effects changes Added a flag to avoid construction of application panes. Fixed QDesktopWidget autotest. Fixed a doc error. Enable building with MSVC2008 Added mention of Symbian binary packages to INSTALL file Fix for QTBUG-5870 QGraphicsProxyWidget does not show children on Deploy sqlite3.sis instead of sqlite3.dll in Symbian Separated "make run" and "make runonphone" targets Added UIDs and icons to some webkit examples Implemented node disconnection in Phonon MMF backend Removed dead code from Phonon MMF backend Re-emit prefinishMarkReached and aboutToFinish if rewound back past mark. Implemented support for playlist handling in Phonon MMF backend Mediaplayer: enqueue all entries from .ram file before starting playback Changed call sequence of seeking in Phonon MMF backend, for streaming Implemented buffer status notifications in Phonon MMF backend Added support for streaming playback to Phonon MMF backend Phonon MMF: leaves during object construction throw exceptions Removed stale TODO comments from Phonon MMF backend ...
Diffstat (limited to 'tools/runonphone')
-rw-r--r--tools/runonphone/main.cpp4
-rw-r--r--tools/runonphone/runonphone.pro3
-rw-r--r--tools/runonphone/serenum_win.cpp11
3 files changed, 7 insertions, 11 deletions
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp
index e2f6758..6081e67 100644
--- a/tools/runonphone/main.cpp
+++ b/tools/runonphone/main.cpp
@@ -155,6 +155,10 @@ int main(int argc, char *argv[])
serialPortName = id.portName;
}
}
+ if(serialPortName.isEmpty()) {
+ errstream << "No phone found, ensure USB cable is connected or specify manually with -p" << endl;
+ return 1;
+ }
}
QScopedPointer<trk::Launcher> launcher;
diff --git a/tools/runonphone/runonphone.pro b/tools/runonphone/runonphone.pro
index d243121..cf0c055 100644
--- a/tools/runonphone/runonphone.pro
+++ b/tools/runonphone/runonphone.pro
@@ -15,5 +15,6 @@ HEADERS += trksignalhandler.h \
windows {
SOURCES += serenum_win.cpp
LIBS += -lsetupapi \
- -luuid
+ -luuid \
+ -ladvapi32
}
diff --git a/tools/runonphone/serenum_win.cpp b/tools/runonphone/serenum_win.cpp
index ec11c3c..23e3862 100644
--- a/tools/runonphone/serenum_win.cpp
+++ b/tools/runonphone/serenum_win.cpp
@@ -77,8 +77,7 @@ QList<SerialPortId> enumerateSerialPorts()
}
HKEY key = SetupDiOpenDevRegKey(infoset, &info, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ);
if(key != INVALID_HANDLE_VALUE) {
-#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
- //RegGetValue not supported on XP, SHRegGetValue not supported by mingw :(
+ //RegGetValue not supported on XP, SHRegGetValue not supported by mingw, so use the old method of enumerating all the values
for (DWORD dwi=0;;dwi++) {
DWORD vsize = valueName.size();
if (ERROR_SUCCESS == RegEnumValue(key, dwi, (WCHAR*)(valueName.data()), &vsize, 0, 0, 0, &size)) {
@@ -93,14 +92,6 @@ QList<SerialPortId> enumerateSerialPorts()
break;
}
}
-#else
- if (ERROR_SUCCESS == SHRegGetValue(key, 0, "PortName", SRRF_RT_REG_SZ, 0, &size)) {
- QByteArray ba(size, 0);
- if (ERROR_SUCCESS == RegGetValue(key, 0, "PortName", SRRF_RT_REG_SZ, (BYTE*)(ba.data()), &size)) {
- portName = QString((const QChar*)(ba.constData()), ba.size() / 2 - 1);
- }
- }
-#endif
RegCloseKey(key);
}
SerialPortId id;