equal
deleted
inserted
replaced
193 return 0; |
193 return 0; |
194 } |
194 } |
195 |
195 |
196 bool FmUtils::isDriveC( const QString &driverName ) |
196 bool FmUtils::isDriveC( const QString &driverName ) |
197 { |
197 { |
198 Q_UNUSED( driverName ); |
198 if( driverName.contains("C",Qt::CaseInsensitive) ){ |
199 return false; |
199 return true; |
|
200 } |
|
201 else{ |
|
202 return false; |
|
203 } |
200 } |
204 } |
201 |
205 |
202 bool FmUtils::isDrive( const QString &path ) |
206 bool FmUtils::isDrive( const QString &path ) |
203 { |
207 { |
204 bool ret( false ); |
208 bool ret( false ); |
214 Q_UNUSED( driverName ); |
218 Q_UNUSED( driverName ); |
215 } |
219 } |
216 |
220 |
217 QString FmUtils::fillPathWithSplash( const QString &filePath ) |
221 QString FmUtils::fillPathWithSplash( const QString &filePath ) |
218 { |
222 { |
219 QString newFilePath( filePath ); |
223 QString newFilePath; |
220 if( filePath.isEmpty() ) { |
224 if( filePath.isEmpty() ) { |
221 return newFilePath; |
225 return newFilePath; |
222 } |
226 } |
223 |
227 |
224 if( filePath.at( filePath.length()-1 ) != QChar( '/' ) ){ |
228 foreach( QChar ch, filePath ) { |
225 newFilePath.append( QChar( '/' ) ); |
229 if( ch == QChar('\\') || ch == QChar('/') ) { |
226 } |
230 newFilePath.append( QDir::separator() ); |
|
231 } else { |
|
232 newFilePath.append( ch ); |
|
233 } |
|
234 } |
|
235 |
|
236 if( newFilePath.right( 1 )!= QDir::separator() ){ |
|
237 newFilePath.append( QDir::separator() ); |
|
238 } |
|
239 |
227 return newFilePath; |
240 return newFilePath; |
228 } |
241 } |
229 |
242 |
230 QString FmUtils::removePathSplash( const QString &filePath ) |
243 QString FmUtils::removePathSplash( const QString &filePath ) |
231 { |
244 { |
416 return false; |
429 return false; |
417 } |
430 } |
418 |
431 |
419 QString FmUtils::formatPath( const QString &path ) |
432 QString FmUtils::formatPath( const QString &path ) |
420 { |
433 { |
421 Q_UNUSED( path ); |
434 QString formatPath; |
422 return false; |
435 foreach( QChar ch, path ) { |
|
436 if( ch == QChar('\\') || ch == QChar('/') ) { |
|
437 formatPath.append( QDir::separator() ); |
|
438 } else { |
|
439 formatPath.append( ch ); |
|
440 } |
|
441 } |
|
442 |
|
443 if( formatPath.right( 1 ) != QDir::separator() ){ |
|
444 formatPath.append( QDir::separator() ); |
|
445 } |
|
446 return formatPath; |
423 } |
447 } |
424 |
448 |
425 int FmUtils::getMaxFileNameLength() |
449 int FmUtils::getMaxFileNameLength() |
426 { |
450 { |
427 return KMaxFileName; |
451 return KMaxFileName; |