equal
deleted
inserted
replaced
47 QString value; |
47 QString value; |
48 QFileInfo fileInfo(srcFile); |
48 QFileInfo fileInfo(srcFile); |
49 bool ret = FmDlgUtils::showTextQuery( questionText, value, true, maxFileNameLength, QString(), false ); |
49 bool ret = FmDlgUtils::showTextQuery( questionText, value, true, maxFileNameLength, QString(), false ); |
50 while ( ret ) { |
50 while ( ret ) { |
51 bool checkResult = true; |
51 bool checkResult = true; |
|
52 // remove whitespace from the start and the end. |
|
53 value = value.trimmed(); |
52 QString newTargetPath = FmUtils::fillPathWithSplash( |
54 QString newTargetPath = FmUtils::fillPathWithSplash( |
53 fileInfo.absolutePath() ) + value; |
55 fileInfo.absolutePath() ) + value; |
54 QFileInfo newFileInfo( newTargetPath ); |
56 QFileInfo newFileInfo( newTargetPath ); |
55 if (!FmUtils::checkFolderFileName(value)) { |
57 if (!FmUtils::checkFolderFileName(value)) { |
56 FmDlgUtils::information( hbTrId( "Invalid file or folder name, try again!" ) ); |
58 FmDlgUtils::information( hbTrId( "Invalid file or folder name, try again!" ) ); |