Changeset 968
- Timestamp:
- 11/08/08 14:25:29 (2 months ago)
- Location:
- mchelper/branches/v25
- Files:
-
- 3 modified
-
include/Preferences.h (modified) (1 diff)
-
src/Inspector.cpp (modified) (1 diff)
-
src/Uploader.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mchelper/branches/v25/include/Preferences.h
r832 r968 14 14 #define DEFAULT_CHECK_UPDATES true 15 15 16 #ifdef Q_WS_WIN 17 #define DEFAULT_SAM7_PATH "C:\something\sam7.exe" 18 #else 19 #define DEFAULT_SAM7_PATH "/usr/bin/sam7" 20 #endif 16 #define DEFAULT_SAM7_PATH "/usr/bin/sam7" // only relevant for *nix 21 17 22 18 class MainWindow; -
mchelper/branches/v25/src/Inspector.cpp
r963 r968 116 116 { 117 117 msgs << QString( "/system/name %1" ).arg( QString( "\"%1\"" ).arg( newName ) ); 118 mainWindow->setBoardName( board->key(), QString( "%1 : %2" ).arg(newName).arg(board-> location()) );118 mainWindow->setBoardName( board->key(), QString( "%1 : %2" ).arg(newName).arg(board->key()) ); 119 119 } 120 120 -
mchelper/branches/v25/src/Uploader.cpp
r966 r968 61 61 CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); 62 62 CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, kCFURLPOSIXPathStyle); 63 Q String uploaderName = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding());64 uploaderName += "/Contents/Resources/sam7";63 QDir appBundle( CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding()) ); 64 QString uploaderName = appBundle.filePath( "Contents/Resources/sam7" ); 65 65 #elif defined (Q_WS_WIN) 66 66 QString uploaderName = QDir::current().filePath("sam7"); … … 69 69 QString uploaderName = settings.value("sam7_path", DEFAULT_SAM7_PATH).toString(); 70 70 #endif 71 int offset = 0; // escape any spaces in the filename 72 do 73 { 74 offset = filename.indexOf(" ", offset); 75 if( offset != -1 ) 76 { 77 filename.insert(offset, "\\"); 78 offset += 2; // step past the \ we inserted and the space we put it in front of 79 } 80 } while( offset != -1 ); 81 qDebug( "uploading %s", qPrintable(filename)); 82 71 83 QStringList uploaderArgs; 72 84 uploaderArgs << "-e" << "set_clock";
