--- a/filemanager/rom/filemngr.iby Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/rom/filemngr.iby Mon Oct 18 09:44:31 2010 +0800
@@ -33,6 +33,7 @@
data=DATAZ_\private\2002BCC0\backup_registration.xml private\2002BCC0\backup_registration.xml
data=DATAZ_\private\2002BCC0\burconfig.xml private\2002BCC0\burconfig.xml
+data=DATAZ_\system\install\filemngr_stub.sis system\install\filemngr_stub.sis
#endif
Binary file filemanager/sis/filemngr_stub.sis has changed
--- a/filemanager/src/filemanager/filemanager.pri Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/filemanager.pri Mon Oct 18 09:44:31 2010 +0800
@@ -23,6 +23,7 @@
src/fmfileview.h \
src/fmfilebrowsewidget.h \
src/fmdriverview.h \
+ src/fmapplication.h \
src/fmmainwindow.h \
src/fmsplitview.h \
src/fmfindthread.h \
@@ -65,6 +66,7 @@
src/fmfileview.cpp \
src/fmfilebrowsewidget.cpp \
src/fmdriverview.cpp \
+ src/fmapplication.cpp \
src/fmmainwindow.cpp \
src/fmsplitview.cpp \
src/fmfindthread.cpp \
--- a/filemanager/src/filemanager/filemanager.pro Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/filemanager.pro Mon Oct 18 09:44:31 2010 +0800
@@ -56,7 +56,9 @@
TARGET.CAPABILITY = CAP_APPLICATION DiskAdmin AllFiles PowerMgmt
BLD_INF_RULES.prj_exports += "./backup_registration.xml z:/private/2002BCC0/backup_registration.xml"
- BLD_INF_RULES.prj_exports += "./burconfig.xml z:/private/2002BCC0/burconfig.xml"
+ BLD_INF_RULES.prj_exports += "./burconfig.xml z:/private/2002BCC0/burconfig.xml"
+ BLD_INF_RULES.prj_exports += "../../sis/filemngr_stub.sis z:/system/install/filemngr_stub.sis"
+
}
symbian:MMP_RULES += SMPSAFE
--- a/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -87,7 +87,7 @@
bool FmBackupRestoreHandler::startRestore( FmOperationRestore *operationRestore )
{
mCurrentProcess = ProcessRestore;
- mBkupEngine->RestoreSettingsL()->SetSelection( operationRestore->selection() );
+ mBkupEngine->RestoreSettings()->SetSelection( operationRestore->selection() );
bool ret = mBkupEngine->startRestore( backupConfigLoader()->driversAndOperationList() );
if( !ret ) {
mCurrentProcess = ProcessNone;
@@ -97,7 +97,7 @@
int FmBackupRestoreHandler::deleteBackup( quint64 selection )
{
- mBkupEngine->RestoreSettingsL()->SetSelection( selection );
+ mBkupEngine->RestoreSettings()->SetSelection( selection );
mBkupEngine->deleteBackup( backupConfigLoader()->driversAndOperationList() );
return FmErrNone;
}
--- a/filemanager/src/filemanager/src/backuprestore/fmbackupwidget.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/backuprestore/fmbackupwidget.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -91,7 +91,7 @@
connect( this, SIGNAL(changeTargetDrive()), this, SLOT(on_changeTargetDrive()), Qt::QueuedConnection);
//mBackupSettings = new FmBackupSettings();
- mBackupSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->BackupSettingsL();
+ mBackupSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->BackupSettings();
mBackupSettings->load();
emit doModelRefresh();
--- a/filemanager/src/filemanager/src/backuprestore/fmdeletebackupwidget.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/backuprestore/fmdeletebackupwidget.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -77,7 +77,7 @@
}
mModel->removeRows( 0, mModel->rowCount() );
- mRestoreSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->RestoreSettingsL();
+ mRestoreSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->RestoreSettings();
mBackupConfigLoader = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->backupConfigLoader();
mRestoreSettings->load( mBackupConfigLoader->driversAndOperationList() );
--- a/filemanager/src/filemanager/src/backuprestore/fmrestorewidget.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/backuprestore/fmrestorewidget.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -74,11 +74,11 @@
mModel = new QStringListModel();
mListView->setModel( mModel );
- mRestoreSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->RestoreSettingsL();
+ mRestoreSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->RestoreSettings();
mBackupConfigLoader = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->backupConfigLoader();
// load backup settings to refresh default target drive
- FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->BackupSettingsL()->load();
+ FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->BackupSettings()->load();
mRestoreSettings->load( mBackupConfigLoader->driversAndOperationList() );
int index = 0;
@@ -126,7 +126,7 @@
}
mModel->removeRows( 0, mModel->rowCount() );
- mRestoreSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->RestoreSettingsL();
+ mRestoreSettings = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->bkupEngine()->RestoreSettings();
mBackupConfigLoader = FmViewManager::viewManager()->operationService()->backupRestoreHandler()->backupConfigLoader();
mRestoreSettings->load( mBackupConfigLoader->driversAndOperationList() );
--- a/filemanager/src/filemanager/src/components/fmviewdetailsdialog.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/components/fmviewdetailsdialog.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -240,7 +240,7 @@
mDataListModel->insertRows( 0, EFileDetailEntryEnd );
dataList << hbTrId ( "txt_fmgr_dblist_name" );
- dataList << fileInfo.baseName();
+ dataList << fileInfo.completeBaseName();
mDataListModel->setData( mDataListModel->index( EFileName, 0 ), dataList, Qt::DisplayRole );
dataList.clear();
@@ -248,7 +248,7 @@
- QString fileType( fileInfo.completeSuffix() );
+ QString fileType( fileInfo.suffix() );
if( fileType.isEmpty() ){
fileType.append( FmUtils::getFileType( filePath ) );
} else {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/src/fmapplication.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "fmapplication.h"
+
+/*!
+ FmApplication
+ Inherit HbApplication, mainly used for emit applicationReady Signal.
+ */
+
+/*!
+ \fn void FmApplication::applicationReady()
+
+ This signal is emitted when mainwindow has constructed, used for Matti test.
+*/
+
+/*!
+ constructor.
+ */
+FmApplication::FmApplication(int &argc, char *argv[]):
+ HbApplication(argc, argv)
+{
+}
+
+/*!
+ Destructor.
+ */
+FmApplication::~FmApplication()
+{
+}
+
+/*!
+ Emit applicationReady
+*/
+void FmApplication::handleAppReady()
+{
+ emit applicationReady();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filemanager/src/filemanager/src/fmapplication.h Mon Oct 18 09:44:31 2010 +0800
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef FMAPPLICATION_H
+#define FMAPPLICATION_H
+
+#include <hbapplication.h>
+
+class FmApplication: public HbApplication
+{
+ Q_OBJECT
+public:
+ FmApplication(int &argc, char *argv[]);
+ virtual ~FmApplication();
+ void handleAppReady();
+signals:
+ void applicationReady();
+};
+
+#endif /* FMAPPLICATION_H */
--- a/filemanager/src/filemanager/src/fmfilebrowsewidget.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/fmfilebrowsewidget.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -184,6 +184,8 @@
mFileBrowseStyle = TreeStyle;
} else if ( style == LabelStyle ){
mLayout->addItem( mEmptyTipLabel );
+ mLayout->setAlignment( mEmptyTipLabel, Qt::AlignCenter );
+ mEmptyTipLabel->setAlignment( Qt::AlignCenter );
mEmptyTipLabel->show();
}
--- a/filemanager/src/filemanager/src/fmfileview.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/fmfileview.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -33,6 +33,8 @@
#include <hbmenu.h>
#include <hbaction.h>
#include <hbtoolbar.h>
+#include <hblistwidget.h>
+#include <hblistwidgetitem.h>
#include <hbtoolbarextension.h>
#include <hblineedit.h>
#include <hbpushbutton.h>
@@ -218,38 +220,47 @@
mFindAction->setDisabled( mIsFindDisabled );
toolBar()->addAction( mFindAction );
toolBar()->setOrientation( Qt::Horizontal );
-
- mSortNameAction = new HbAction( this );
- mSortNameAction->setText( hbTrId( "txt_fmgr_setlabel_sort_by_name" ) );
-
- mSortTimeAction = new HbAction( this );
- mSortTimeAction->setText( hbTrId( "txt_fmgr_setlabel_sort_by_time" ) );
-
- mSortSizeAction = new HbAction( this );
- mSortSizeAction->setText( hbTrId( "txt_fmgr_setlabel_sort_by_size" ) );
-
- mSortTypeAction = new HbAction( this );
- mSortTypeAction->setText( hbTrId( "txt_fmgr_setlabel_sort_by_type" ) );
-
- mSortExtension = new HbToolBarExtension();
- mSortExtension->addAction( mSortNameAction );
- mSortExtension->addAction( mSortTimeAction );
- mSortExtension->addAction( mSortSizeAction );
- mSortExtension->addAction( mSortTypeAction );
-
- HbAction* extensionAction = toolBar()->addExtension( mSortExtension );
- extensionAction->setText( hbTrId("txt_fmgr_opt_sort"));
-
+
+ // Add the action that will open the toolbar extension.
+ HbAction *sortExtensionAction = toolBar()->addAction( hbTrId("txt_fmgr_opt_sort") );
+
+ // Create the toolbar extension.
+ mSortExtension = new HbToolBarExtension();
+
+ // Create a list widget.
+ HbListWidget *sortExtensionList = new HbListWidget();
+ sortExtensionList->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+
+ // Make the list single selection.
+ sortExtensionList->setSelectionMode(HbAbstractItemView::SingleSelection);
+
+ // Add list items.
+ mSortItemName = new HbListWidgetItem;
+ mSortItemName->setText( hbTrId( "txt_fmgr_setlabel_sort_by_name" ) );
+
+ mSortItemTime = new HbListWidgetItem;
+ mSortItemTime->setText( hbTrId( "txt_fmgr_setlabel_sort_by_time" ) );
+
+ mSortItemSize = new HbListWidgetItem;
+ mSortItemSize->setText( hbTrId( "txt_fmgr_setlabel_sort_by_size" ) );
+
+ mSortItemType = new HbListWidgetItem;
+ mSortItemType->setText( hbTrId( "txt_fmgr_setlabel_sort_by_type" ) );
+
+ sortExtensionList->addItem( mSortItemName );
+ sortExtensionList->addItem( mSortItemTime );
+ sortExtensionList->addItem( mSortItemSize );
+ sortExtensionList->addItem( mSortItemType );
+ // Add the list widget to the toolbar extension object.
+ mSortExtension->setContentWidget(sortExtensionList);
+
+ // Add the toolbar extension to the toolbar action that will open it.
+ sortExtensionAction->setToolBarExtension(mSortExtension);
+
+ connect(sortExtensionList, SIGNAL(activated(HbListWidgetItem*)),
+ this,SLOT(on_sortToolBarList_Activated(HbListWidgetItem*)), Qt::QueuedConnection );
connect( mFindAction, SIGNAL( triggered() ),
this, SLOT( on_leftAction_triggered() ) );
- connect( mSortNameAction, SIGNAL( triggered() ),
- this, SLOT( on_sortNameAction_triggered() ), Qt::QueuedConnection );
- connect( mSortTimeAction, SIGNAL( triggered() ),
- this, SLOT( on_sortTimeAction_triggered() ), Qt::QueuedConnection );
- connect( mSortSizeAction, SIGNAL( triggered() ),
- this, SLOT( on_sortSizeAction_triggered() ), Qt::QueuedConnection );
- connect( mSortTypeAction, SIGNAL( triggered() ),
- this, SLOT( on_sortTypeAction_triggered() ), Qt::QueuedConnection );
}
void FmFileView::setStyle( FmFileBrowseWidget::Style style )
@@ -454,6 +465,21 @@
mWidget->on_driveChanged();
}
+void FmFileView::on_sortToolBarList_Activated(HbListWidgetItem* item )
+{
+ mSortExtension->close();
+ if( item == mSortItemName ){
+ on_sortNameAction_triggered();
+ } else if( item == mSortItemTime ){
+ on_sortTimeAction_triggered();
+ } else if( item == mSortItemSize ){
+ on_sortSizeAction_triggered();
+ } else if( item == mSortItemType ){
+ on_sortTypeAction_triggered();
+ }
+
+}
+
void FmFileView::on_sortNameAction_triggered()
{
mWidget->sortFiles( FmFileBrowseWidget::ESortByName );
--- a/filemanager/src/filemanager/src/fmfileview.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/fmfileview.h Mon Oct 18 09:44:31 2010 +0800
@@ -30,6 +30,7 @@
class HbMenu;
class FmOperationService;
class HbToolBarExtension;
+class HbListWidgetItem;
class FmFileView : public FmViewBase
{
@@ -64,6 +65,7 @@
void on_sortTimeAction_triggered();
void on_sortSizeAction_triggered();
void on_sortTypeAction_triggered();
+ void on_sortToolBarList_Activated( HbListWidgetItem* item );
void startSearch( const QString &criteria );
void on_mainWidget_setEmptyMenu( bool isMenuEmpty );
@@ -108,11 +110,12 @@
// store the disable state of find action. true for disabled
bool mIsFindDisabled;
-
- HbAction *mSortNameAction;
- HbAction *mSortTimeAction;
- HbAction *mSortSizeAction;
- HbAction *mSortTypeAction;
+
+ HbListWidgetItem *mSortItemName;
+ HbListWidgetItem *mSortItemTime;
+ HbListWidgetItem *mSortItemSize;
+ HbListWidgetItem *mSortItemType;
+
};
#endif
--- a/filemanager/src/filemanager/src/fmmainwindow.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/fmmainwindow.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -16,6 +16,7 @@
* The source file of File Manager main window
*/
+#include "fmapplication.h"
#include "fmmainwindow.h"
#include "fmcommon.h"
@@ -90,10 +91,13 @@
}
/*
- Slot to receive timer event after application started and emit applicationReady signal
+ Slot to receive timer event after application started and
+ call FmApplication's handleAppReady() to emit applicationReady signal
*/
void FmMainWindow::onApplicationReady()
-{
- mShowTimer.stop();
- emit applicationReady();
+{
+ if ( FmApplication *app = qobject_cast<FmApplication *>( qApp ) ) {
+ app->handleAppReady();
+ }
+ mShowTimer.stop();
}
--- a/filemanager/src/filemanager/src/fmmainwindow.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/fmmainwindow.h Mon Oct 18 09:44:31 2010 +0800
@@ -32,10 +32,6 @@
public:
FmMainWindow();
~FmMainWindow();
-
-signals:
- void applicationReady();
-
private slots:
void onOrientationChanged( Qt::Orientation orientation );
void delayedLoading();
--- a/filemanager/src/filemanager/src/main.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/main.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -19,10 +19,9 @@
*
*/
-
+#include "fmapplication.h"
#include "fmmainwindow.h"
-#include <hbapplication.h>
#include <hbstyleloader.h>
#include <hbtranslator.h>
#include <QTranslator>
@@ -31,7 +30,7 @@
int main( int argc, char *argv[] )
{
FM_LOG( "main start" );
- HbApplication app( argc, argv );
+ FmApplication app( argc, argv );
HbTranslator translator("filemanager");
translator.loadCommon();
--- a/filemanager/src/filemanager/src/operationservice/fmoperationcopyormove.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationcopyormove.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -232,13 +232,7 @@
return FmErrCannotRemove;
}
} else if ( fi.isDir() ) {
- if( operationType() == FmOperationService::EOperationTypeMove
- && FmUtils::isDefaultFolder( source ) ){
- ret = FmErrRemoveDefaultFolder;
- }
- else{
- ret = copyOrMoveDirInsideContent( source, newName );
- }
+ ret = copyOrMoveDirInsideContent( source, newName );
if( ret!= FmErrNone ) {
return ret;
}
--- a/filemanager/src/filemanager/src/operationservice/fmoperationformat_s60.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationformat_s60.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -68,15 +68,14 @@
QString logString = "FmOperationFormat::start";
FM_LOG( logString );
- emit notifyPreparing( false );
-
if( mDriverName.isEmpty() ) {
emit notifyError( FmErrWrongParam, QString() );
return;
}
- FmViewManager::viewManager()->serviceUtils()->closeApps();
-
-
+
+ // FmServiceUtils::closeApps will be called in FmOperationResultProcessor
+ // after receive notifyPreparing
+ emit notifyPreparing( false );
RFormat format;
RFs fs;
@@ -207,13 +206,14 @@
restoreVolumeName( drive );
FmUtils::createDefaultFolders( mDriverName );
}
-
- FmViewManager::viewManager()->serviceUtils()->restartApps();
// refresh drive space no care if cancel, error or finished.
// as filemanger cannot notify drive space changed
// do not refresh path as QFileSystemModel will do auto-refresh
- emit driveSpaceChanged();
+ emit driveSpaceChanged();
+
+ // FmServiceUtils::restartApps will be called in FmOperationResultProcessor
+ // after receive notifyFinish or notifyError
if( err == KErrNone ){
emit notifyFinish();
}
--- a/filemanager/src/filemanager/src/operationservice/fmoperationremove.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationremove.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -125,14 +125,7 @@
}
IncreaseProgressOnce();
} else if (fi.isDir()) {
- if( FmUtils::isDefaultFolder( fileName ) ){
- ret = FmErrRemoveDefaultFolder;
- }
- else{
- ret = recursiveRemoveDir( fileName );
- }
-
-
+ ret = recursiveRemoveDir( fileName );
} else {
qWarning( "Things other than file and directory are not copied" );
ret = FmErrIsNotFileOrFolder;
--- a/filemanager/src/filemanager/src/operationservice/fmoperationresultprocesser.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationresultprocesser.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -25,6 +25,9 @@
#include "fmviewdetailsdialog.h"
#include "fmdlgutils.h"
#include "fmutils.h"
+#include "fmviewmanager.h"
+#include "fmserviceutils.h"
+
#include <hbaction.h>
#include <hbprogressdialog.h>
#include <hbaction.h>
@@ -86,7 +89,7 @@
if ( ( srcFileInfo.suffix().compare( destFileInfo.suffix(), Qt::CaseInsensitive ) != 0 )
&& srcFileInfo.isFile() ) {
// popup warning when the suffix of file is changed.
- FmDlgUtils::warning( hbTrId( "File may become unusable when file name extension is changed" ) );
+ FmDlgUtils::warning( hbTrId( "File may become unusable when file name extension is changed" ), HbMessageBox::Ok, true );
}
}
}
@@ -175,13 +178,17 @@
break;
case FmOperationService::EOperationTypeFormat:
title = hbTrId("format preparing");
- FmUtils::setSystem( true );
break;
default:
break;
}
-
showPreparing( title, cancelable );
+
+ // closeApps before format
+ if( operationBase->operationType() == FmOperationService::EOperationTypeFormat ) {
+ FmUtils::setSystem( true );
+ FmViewManager::viewManager()->serviceUtils()->closeApps();
+ }
}
/*
@@ -259,6 +266,8 @@
case FmOperationService::EOperationTypeFormat:
{
FmUtils::setSystem( false );
+ // restart apps after format finished.
+ FmViewManager::viewManager()->serviceUtils()->restartApps();
FmDlgUtils::information( QString( hbTrId("Format succeed!")), HbMessageBox::Ok, true );
FmOperationFormat *paramFormat = static_cast<FmOperationFormat*>( operationBase );
QString title( hbTrId( "Drive name ") );
@@ -421,6 +430,8 @@
switch( operationBase->operationType() )
{
case FmOperationService::EOperationTypeFormat:
+ // restart apps after format failed.
+ FmViewManager::viewManager()->serviceUtils()->restartApps();
FmDlgUtils::warning( QString( hbTrId("Format failed!")) );
break;
default:
--- a/filemanager/src/filemanager/src/operationservice/fmoperationservice.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/filemanager/src/operationservice/fmoperationservice.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -204,9 +204,8 @@
return FmErrAlreadyStarted;
Q_ASSERT( !mCurrentOperation );
- // BackupSettingsL will not leave, coding convention will be improvied in another task.
- QString targetDrive( backupRestoreHandler()->bkupEngine()->BackupSettingsL()->availableTargetDrive() );
- quint32 content( backupRestoreHandler()->bkupEngine()->BackupSettingsL()->content() );
+ QString targetDrive( backupRestoreHandler()->bkupEngine()->BackupSettings()->availableTargetDrive() );
+ quint32 content( backupRestoreHandler()->bkupEngine()->BackupSettings()->content() );
FmOperationBackup *operationBackup =
new FmOperationBackup( backupRestoreHandler(), targetDrive, content );
mCurrentOperation = operationBackup;
--- a/filemanager/src/fmbkupenginewrapper/bwins/fmbkupenginewrapperu.def Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/bwins/fmbkupenginewrapperu.def Mon Oct 18 09:44:31 2010 +0800
@@ -5,14 +5,14 @@
?trUtf8@FmBkupEngine@@SA?AVQString@@PBD0H@Z @ 4 NONAME ; class QString FmBkupEngine::trUtf8(char const *, char const *, int)
?error@FmBkupEngine@@QBEHXZ @ 5 NONAME ; int FmBkupEngine::error(void) const
?availableTargetDrive@FmBackupSettings@@QBE?AVQString@@XZ @ 6 NONAME ; class QString FmBackupSettings::availableTargetDrive(void) const
- ?GetSelectionL@FmRestoreSettings@@QBEXAAV?$QList@VFmRestoreInfo@@@@@Z @ 7 NONAME ; void FmRestoreSettings::GetSelectionL(class QList<class FmRestoreInfo> &) const
- ?content@FmBackupSettings@@QBEIXZ @ 8 NONAME ; unsigned int FmBackupSettings::content(void) const
- ?getBackupDriveList@FmBkupEngine@@QAEXAAVQStringList@@@Z @ 9 NONAME ; void FmBkupEngine::getBackupDriveList(class QStringList &)
- ?resetAndDestoryRestoreEntry@FmRestoreSettings@@AAEXXZ @ 10 NONAME ; void FmRestoreSettings::resetAndDestoryRestoreEntry(void)
- ?targetDriveToString@FmBackupSettings@@QAE?AVQString@@ABV2@@Z @ 11 NONAME ; class QString FmBackupSettings::targetDriveToString(class QString const &)
- ?setScheduling@FmBackupSettings@@QAEXW4TFileManagerBackupSchedule@1@@Z @ 12 NONAME ; void FmBackupSettings::setScheduling(enum FmBackupSettings::TFileManagerBackupSchedule)
- ?notifyFinish@FmBkupEngine@@IAEXH@Z @ 13 NONAME ; void FmBkupEngine::notifyFinish(int)
- ?qt_metacast@FmBkupEngine@@UAEPAXPBD@Z @ 14 NONAME ; void * FmBkupEngine::qt_metacast(char const *)
+ ?content@FmBackupSettings@@QBEIXZ @ 7 NONAME ; unsigned int FmBackupSettings::content(void) const
+ ?getBackupDriveList@FmBkupEngine@@QAEXAAVQStringList@@@Z @ 8 NONAME ; void FmBkupEngine::getBackupDriveList(class QStringList &)
+ ?resetAndDestoryRestoreEntry@FmRestoreSettings@@AAEXXZ @ 9 NONAME ; void FmRestoreSettings::resetAndDestoryRestoreEntry(void)
+ ?targetDriveToString@FmBackupSettings@@QAE?AVQString@@ABV2@@Z @ 10 NONAME ; class QString FmBackupSettings::targetDriveToString(class QString const &)
+ ?setScheduling@FmBackupSettings@@QAEXW4TFileManagerBackupSchedule@1@@Z @ 11 NONAME ; void FmBackupSettings::setScheduling(enum FmBackupSettings::TFileManagerBackupSchedule)
+ ?notifyFinish@FmBkupEngine@@IAEXH@Z @ 12 NONAME ; void FmBkupEngine::notifyFinish(int)
+ ?qt_metacast@FmBkupEngine@@UAEPAXPBD@Z @ 13 NONAME ; void * FmBkupEngine::qt_metacast(char const *)
+ ?RestoreSettings@FmBkupEngine@@QAEPAVFmRestoreSettings@@XZ @ 14 NONAME ; class FmRestoreSettings * FmBkupEngine::RestoreSettings(void)
??0FmBackupSettings@@QAE@PAVFmBkupEngine@@@Z @ 15 NONAME ; FmBackupSettings::FmBackupSettings(class FmBkupEngine *)
?SetSelection@FmRestoreSettings@@QAEXAB_K@Z @ 16 NONAME ; void FmRestoreSettings::SetSelection(unsigned long long const &)
?startBackup@FmBkupEngine@@QAE_NV?$QList@PAVFmBkupDrivesAndOperation@@@@V?$QList@PAVFmBkupBackupCategory@@@@VQString@@I@Z @ 17 NONAME ; bool FmBkupEngine::startBackup(class QList<class FmBkupDrivesAndOperation *>, class QList<class FmBkupBackupCategory *>, class QString, unsigned int)
@@ -23,41 +23,41 @@
?weekdayToString@FmBackupSettings@@SA?AVQString@@W4TFileManagerBackupWeekday@1@@Z @ 22 NONAME ; class QString FmBackupSettings::weekdayToString(enum FmBackupSettings::TFileManagerBackupWeekday)
?tr@FmBkupEngine@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString FmBkupEngine::tr(char const *, char const *, int)
?contentToString@FmBackupSettings@@SA?AVQString@@I@Z @ 24 NONAME ; class QString FmBackupSettings::contentToString(unsigned int)
- ?RestoreSettingsL@FmBkupEngine@@QAEPAVFmRestoreSettings@@XZ @ 25 NONAME ; class FmRestoreSettings * FmBkupEngine::RestoreSettingsL(void)
- ?createBackupDateEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 26 NONAME ; class FmBackupEntry * FmBackupSettings::createBackupDateEntry(void)
- ?GetRestoreInfoArray@FmBkupEngine@@QAEXAAV?$QList@PAVFmBkupDrivesAndOperation@@@@AAV?$QList@VFmRestoreInfo@@@@ABVQString@@@Z @ 27 NONAME ; void FmBkupEngine::GetRestoreInfoArray(class QList<class FmBkupDrivesAndOperation *> &, class QList<class FmRestoreInfo> &, class QString const &)
- ?time@FmBackupSettings@@QBEABVQTime@@XZ @ 28 NONAME ; class QTime const & FmBackupSettings::time(void) const
- ?createWeekdayEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 29 NONAME ; class FmBackupEntry * FmBackupSettings::createWeekdayEntry(void)
- ?cancelBackup@FmBkupEngine@@QAEXXZ @ 30 NONAME ; void FmBkupEngine::cancelBackup(void)
- ?notifyUpdate@FmBkupEngine@@IAEXH@Z @ 31 NONAME ; void FmBkupEngine::notifyUpdate(int)
- ?save@FmBackupSettings@@QAEXXZ @ 32 NONAME ; void FmBackupSettings::save(void)
- ??_EFmBkupEngine@@UAE@I@Z @ 33 NONAME ; FmBkupEngine::~FmBkupEngine(unsigned int)
- ?restoreEntryList@FmRestoreSettings@@QAE?AV?$QList@PAVFmRestoreEntry@@@@XZ @ 34 NONAME ; class QList<class FmRestoreEntry *> FmRestoreSettings::restoreEntryList(void)
- ?createTimeEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 35 NONAME ; class FmBackupEntry * FmBackupSettings::createTimeEntry(void)
- ?weekday@FmBackupSettings@@QBE?AW4TFileManagerBackupWeekday@1@XZ @ 36 NONAME ; enum FmBackupSettings::TFileManagerBackupWeekday FmBackupSettings::weekday(void) const
- ?deleteBackup@FmBkupEngine@@QAEHV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 37 NONAME ; int FmBkupEngine::deleteBackup(class QList<class FmBkupDrivesAndOperation *>)
- ??1FmBackupSettings@@QAE@XZ @ 38 NONAME ; FmBackupSettings::~FmBackupSettings(void)
- ?setTime@FmBackupSettings@@QAEXABVQTime@@@Z @ 39 NONAME ; void FmBackupSettings::setTime(class QTime const &)
- ?backupEntryList@FmBackupSettings@@QAE?AV?$QList@PAVFmBackupEntry@@@@XZ @ 40 NONAME ; class QList<class FmBackupEntry *> FmBackupSettings::backupEntryList(void)
- ?contentsSelected@FmBackupSettings@@ABEHXZ @ 41 NONAME ; int FmBackupSettings::contentsSelected(void) const
- ?refreshList@FmBackupSettings@@AAEXXZ @ 42 NONAME ; void FmBackupSettings::refreshList(void)
- ?trUtf8@FmBkupEngine@@SA?AVQString@@PBD0@Z @ 43 NONAME ; class QString FmBkupEngine::trUtf8(char const *, char const *)
- ?CreateEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@ABVQString@@0W4TSettingType@2@@Z @ 44 NONAME ; class FmBackupEntry * FmBackupSettings::CreateEntry(class QString const &, class QString const &, enum FmBackupEntry::TSettingType)
- ?targetDrive@FmBackupSettings@@QBE?AVQString@@XZ @ 45 NONAME ; class QString FmBackupSettings::targetDrive(void) const
- ??0FmBkupEngine@@QAE@PAVQObject@@@Z @ 46 NONAME ; FmBkupEngine::FmBkupEngine(class QObject *)
- ?notifyPreparing@FmBkupEngine@@IAEX_N@Z @ 47 NONAME ; void FmBkupEngine::notifyPreparing(bool)
- ?load@FmRestoreSettings@@QAEXV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 48 NONAME ; void FmRestoreSettings::load(class QList<class FmBkupDrivesAndOperation *>)
- ?setWeekday@FmBackupSettings@@QAEXW4TFileManagerBackupWeekday@1@@Z @ 49 NONAME ; void FmBackupSettings::setWeekday(enum FmBackupSettings::TFileManagerBackupWeekday)
- ??1FmRestoreSettings@@QAE@XZ @ 50 NONAME ; FmRestoreSettings::~FmRestoreSettings(void)
- ?createContentsEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 51 NONAME ; class FmBackupEntry * FmBackupSettings::createContentsEntry(void)
- ?notifyBackupFilesExist@FmBkupEngine@@IAEXAA_N@Z @ 52 NONAME ; void FmBkupEngine::notifyBackupFilesExist(bool &)
- ?updateBackupDate@FmBackupSettings@@QAEXXZ @ 53 NONAME ; void FmBackupSettings::updateBackupDate(void)
+ ?createBackupDateEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 25 NONAME ; class FmBackupEntry * FmBackupSettings::createBackupDateEntry(void)
+ ?GetRestoreInfoArray@FmBkupEngine@@QAEXAAV?$QList@PAVFmBkupDrivesAndOperation@@@@AAV?$QList@VFmRestoreInfo@@@@ABVQString@@@Z @ 26 NONAME ; void FmBkupEngine::GetRestoreInfoArray(class QList<class FmBkupDrivesAndOperation *> &, class QList<class FmRestoreInfo> &, class QString const &)
+ ?time@FmBackupSettings@@QBEABVQTime@@XZ @ 27 NONAME ; class QTime const & FmBackupSettings::time(void) const
+ ?createWeekdayEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 28 NONAME ; class FmBackupEntry * FmBackupSettings::createWeekdayEntry(void)
+ ?cancelBackup@FmBkupEngine@@QAEXXZ @ 29 NONAME ; void FmBkupEngine::cancelBackup(void)
+ ?notifyUpdate@FmBkupEngine@@IAEXH@Z @ 30 NONAME ; void FmBkupEngine::notifyUpdate(int)
+ ?save@FmBackupSettings@@QAEXXZ @ 31 NONAME ; void FmBackupSettings::save(void)
+ ??_EFmBkupEngine@@UAE@I@Z @ 32 NONAME ; FmBkupEngine::~FmBkupEngine(unsigned int)
+ ?restoreEntryList@FmRestoreSettings@@QAE?AV?$QList@PAVFmRestoreEntry@@@@XZ @ 33 NONAME ; class QList<class FmRestoreEntry *> FmRestoreSettings::restoreEntryList(void)
+ ?createTimeEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 34 NONAME ; class FmBackupEntry * FmBackupSettings::createTimeEntry(void)
+ ?weekday@FmBackupSettings@@QBE?AW4TFileManagerBackupWeekday@1@XZ @ 35 NONAME ; enum FmBackupSettings::TFileManagerBackupWeekday FmBackupSettings::weekday(void) const
+ ?deleteBackup@FmBkupEngine@@QAEHV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 36 NONAME ; int FmBkupEngine::deleteBackup(class QList<class FmBkupDrivesAndOperation *>)
+ ??1FmBackupSettings@@QAE@XZ @ 37 NONAME ; FmBackupSettings::~FmBackupSettings(void)
+ ?setTime@FmBackupSettings@@QAEXABVQTime@@@Z @ 38 NONAME ; void FmBackupSettings::setTime(class QTime const &)
+ ?backupEntryList@FmBackupSettings@@QAE?AV?$QList@PAVFmBackupEntry@@@@XZ @ 39 NONAME ; class QList<class FmBackupEntry *> FmBackupSettings::backupEntryList(void)
+ ?contentsSelected@FmBackupSettings@@ABEHXZ @ 40 NONAME ; int FmBackupSettings::contentsSelected(void) const
+ ?refreshList@FmBackupSettings@@AAEXXZ @ 41 NONAME ; void FmBackupSettings::refreshList(void)
+ ?trUtf8@FmBkupEngine@@SA?AVQString@@PBD0@Z @ 42 NONAME ; class QString FmBkupEngine::trUtf8(char const *, char const *)
+ ?CreateEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@ABVQString@@0W4TSettingType@2@@Z @ 43 NONAME ; class FmBackupEntry * FmBackupSettings::CreateEntry(class QString const &, class QString const &, enum FmBackupEntry::TSettingType)
+ ?targetDrive@FmBackupSettings@@QBE?AVQString@@XZ @ 44 NONAME ; class QString FmBackupSettings::targetDrive(void) const
+ ??0FmBkupEngine@@QAE@PAVQObject@@@Z @ 45 NONAME ; FmBkupEngine::FmBkupEngine(class QObject *)
+ ?notifyPreparing@FmBkupEngine@@IAEX_N@Z @ 46 NONAME ; void FmBkupEngine::notifyPreparing(bool)
+ ?load@FmRestoreSettings@@QAEXV?$QList@PAVFmBkupDrivesAndOperation@@@@@Z @ 47 NONAME ; void FmRestoreSettings::load(class QList<class FmBkupDrivesAndOperation *>)
+ ?setWeekday@FmBackupSettings@@QAEXW4TFileManagerBackupWeekday@1@@Z @ 48 NONAME ; void FmBackupSettings::setWeekday(enum FmBackupSettings::TFileManagerBackupWeekday)
+ ??1FmRestoreSettings@@QAE@XZ @ 49 NONAME ; FmRestoreSettings::~FmRestoreSettings(void)
+ ?createContentsEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 50 NONAME ; class FmBackupEntry * FmBackupSettings::createContentsEntry(void)
+ ?notifyBackupFilesExist@FmBkupEngine@@IAEXAA_N@Z @ 51 NONAME ; void FmBkupEngine::notifyBackupFilesExist(bool &)
+ ?updateBackupDate@FmBackupSettings@@QAEXXZ @ 52 NONAME ; void FmBackupSettings::updateBackupDate(void)
+ ?GetSelection@FmRestoreSettings@@QBEXAAV?$QList@VFmRestoreInfo@@@@@Z @ 53 NONAME ; void FmRestoreSettings::GetSelection(class QList<class FmRestoreInfo> &) const
?createSchedulingEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 54 NONAME ; class FmBackupEntry * FmBackupSettings::createSchedulingEntry(void)
?metaObject@FmBkupEngine@@UBEPBUQMetaObject@@XZ @ 55 NONAME ; struct QMetaObject const * FmBkupEngine::metaObject(void) const
?createTargetDriveEntry@FmBackupSettings@@AAEPAVFmBackupEntry@@XZ @ 56 NONAME ; class FmBackupEntry * FmBackupSettings::createTargetDriveEntry(void)
?load@FmBackupSettings@@QAEXXZ @ 57 NONAME ; void FmBackupSettings::load(void)
??1FmBkupEngine@@UAE@XZ @ 58 NONAME ; FmBkupEngine::~FmBkupEngine(void)
- ?BackupSettingsL@FmBkupEngine@@QAEPAVFmBackupSettings@@XZ @ 59 NONAME ; class FmBackupSettings * FmBkupEngine::BackupSettingsL(void)
+ ?BackupSettings@FmBkupEngine@@QAEPAVFmBackupSettings@@XZ @ 59 NONAME ; class FmBackupSettings * FmBkupEngine::BackupSettings(void)
?setContent@FmBackupSettings@@QAEXI@Z @ 60 NONAME ; void FmBackupSettings::setContent(unsigned int)
?schedulingToString@FmBackupSettings@@QAE?AVQString@@W4TFileManagerBackupSchedule@1@@Z @ 61 NONAME ; class QString FmBackupSettings::schedulingToString(enum FmBackupSettings::TFileManagerBackupSchedule)
?setTargetDrive@FmBackupSettings@@QAEXABVQString@@@Z @ 62 NONAME ; void FmBackupSettings::setTargetDrive(class QString const &)
--- a/filemanager/src/fmbkupenginewrapper/eabi/fmbkupenginewrapperu.def Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/eabi/fmbkupenginewrapperu.def Mon Oct 18 09:44:31 2010 +0800
@@ -8,10 +8,10 @@
_ZN12FmBkupEngine12notifyFinishEi @ 7 NONAME
_ZN12FmBkupEngine12notifyUpdateEi @ 8 NONAME
_ZN12FmBkupEngine12startRestoreE5QListIP24FmBkupDrivesAndOperationE @ 9 NONAME
- _ZN12FmBkupEngine15BackupSettingsLEv @ 10 NONAME
- _ZN12FmBkupEngine15notifyMemoryLowEiRi @ 11 NONAME
- _ZN12FmBkupEngine15notifyPreparingEb @ 12 NONAME
- _ZN12FmBkupEngine16RestoreSettingsLEv @ 13 NONAME
+ _ZN12FmBkupEngine14BackupSettingsEv @ 10 NONAME
+ _ZN12FmBkupEngine15RestoreSettingsEv @ 11 NONAME
+ _ZN12FmBkupEngine15notifyMemoryLowEiRi @ 12 NONAME
+ _ZN12FmBkupEngine15notifyPreparingEb @ 13 NONAME
_ZN12FmBkupEngine16staticMetaObjectE @ 14 NONAME DATA 16
_ZN12FmBkupEngine18getBackupDriveListER11QStringList @ 15 NONAME
_ZN12FmBkupEngine19GetRestoreInfoArrayER5QListIP24FmBkupDrivesAndOperationERS0_I13FmRestoreInfoERK7QString @ 16 NONAME
@@ -67,7 +67,7 @@
_ZNK16FmBackupSettings4timeEv @ 66 NONAME
_ZNK16FmBackupSettings7contentEv @ 67 NONAME
_ZNK16FmBackupSettings7weekdayEv @ 68 NONAME
- _ZNK17FmRestoreSettings13GetSelectionLER5QListI13FmRestoreInfoE @ 69 NONAME
+ _ZNK17FmRestoreSettings12GetSelectionER5QListI13FmRestoreInfoE @ 69 NONAME
_ZTI12FmBkupEngine @ 70 NONAME
_ZTV12FmBkupEngine @ 71 NONAME
--- a/filemanager/src/fmbkupenginewrapper/inc/fmbkupengine.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/inc/fmbkupengine.h Mon Oct 18 09:44:31 2010 +0800
@@ -69,7 +69,7 @@
~FmBkupEngine();
- bool startBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
+ bool startBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
QList<FmBkupBackupCategory*> backupCategoryList,
QString drive, quint32 content);
@@ -79,8 +79,8 @@
int deleteBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
int error() const;
- FmBackupSettings* BackupSettingsL();
- FmRestoreSettings* RestoreSettingsL();
+ FmBackupSettings* BackupSettings();
+ FmRestoreSettings* RestoreSettings();
void GetRestoreInfoArray( QList<FmBkupDrivesAndOperation* > &drivesAndOperationList,
QList< FmRestoreInfo > &restoreInfoList,
--- a/filemanager/src/fmbkupenginewrapper/inc/fmrestoresettings.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/inc/fmrestoresettings.h Mon Oct 18 09:44:31 2010 +0800
@@ -150,7 +150,7 @@
*/
QList< FmRestoreEntry* > restoreEntryList();
- void GetSelectionL( QList< FmRestoreInfo >& infoArray ) const;
+ void GetSelection( QList< FmRestoreInfo >& infoArray ) const;
void SetSelection( const quint64& aSelection );
private:
--- a/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -94,7 +94,19 @@
return ret;
}
-bool FmBkupEnginePrivate::startBackup(QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
+/*
+ * wrap up startBackupL as a unleave function
+ */
+bool FmBkupEnginePrivate::startBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
+ QList<FmBkupBackupCategory*> backupCategoryList,
+ QString drive, quint32 content)
+{
+ TBool ret( EFalse );
+ TRAP_IGNORE( ret = startBackupL( drivesAndOperationList, backupCategoryList, drive, content ) );
+ return ret;
+}
+
+bool FmBkupEnginePrivate::startBackupL(QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
QList<FmBkupBackupCategory*> backupCategoryList,
QString drive, quint32 content)
{
@@ -137,8 +149,7 @@
for( QList<FmBkupBackupCategory* >::iterator it = backupCategoryList.begin();
it != backupCategoryList.end(); ++it ) {
FmBkupBackupCategory* fmbkupCategory = *it;
- CBkupCategory* category = CBkupCategory::NewL();
-
+ CBkupCategory* category = CBkupCategory::NewLC();
category->setCategory( fmbkupCategory->category() );
HBufC *archiveName = HBufC::NewL( fmbkupCategory->archive_name().length() );
@@ -164,6 +175,7 @@
iBkupCategoryList->AppendL( category );
+ CleanupStack::Pop();//category
}
TUint32 bkupContent( FmgrToBkupMask( content ) );
@@ -442,17 +454,23 @@
}
}
-
-
+/*
+ * wrap up leave function deleteBackupL.
+ */
+int FmBkupEnginePrivate::deleteBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
+{
+ TInt err( KErrNone );
+ TRAP_IGNORE( err = deleteBackupL( drivesAndOperationList) );
+ return err;
+}
-
-int FmBkupEnginePrivate::deleteBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
+int FmBkupEnginePrivate::deleteBackupL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
{
iError = FmErrNone;
QList< FmRestoreInfo > selection;
- FmRestoreSettings& rstSettings( *( q->RestoreSettingsL() ) );
- rstSettings.GetSelectionL( selection );
+ FmRestoreSettings& rstSettings( *( q->RestoreSettings() ) );
+ rstSettings.GetSelection( selection );
iBkupCategoryList->ResetAndDestroy();
for( QList<FmBkupDrivesAndOperation* >::iterator it = drivesAndOperationList.begin();
@@ -526,8 +544,17 @@
return iError;
}
+/*
+ * wrap up startRestoreL as a unleave function
+ */
+bool FmBkupEnginePrivate::startRestore( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
+{
+ TBool ret( EFalse );
+ TRAP_IGNORE( ret = startRestoreL( drivesAndOperationList ) );
+ return ret;
+}
-bool FmBkupEnginePrivate::StartRestoreL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
+bool FmBkupEnginePrivate::startRestoreL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
{
TBool diskFull( SysUtil::DiskSpaceBelowCriticalLevelL(
&iFs, 0, KFmgrSystemDrive ) );
@@ -579,8 +606,8 @@
// Get user set restore selection
QList< FmRestoreInfo > selection;
// CleanupClosePushL( selection );
- FmRestoreSettings& rstSettings( *( q->RestoreSettingsL() ) );
- rstSettings.GetSelectionL( selection );
+ FmRestoreSettings& rstSettings( *( q->RestoreSettings() ) );
+ rstSettings.GetSelection( selection );
// Remove non user selected archives
TInt i( 0 );
@@ -632,7 +659,7 @@
CMMCScBkupOpParamsRestoreFull::NewL( driveReader, EBUCatAllInOne );
CleanupStack::PopAndDestroy(); // driveReader
- FmBackupSettings& bkupSettings( *( q->BackupSettingsL() ) );
+ FmBackupSettings& bkupSettings( *( q->BackupSettings() ) );
// Get list of all archives
RPointerArray< CMMCScBkupArchiveInfo > archives;
TCleanupItem cleanupItem( ResetAndDestroyArchives, &archives );
--- a/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/private/symbian/fmbkupengine_p.h Mon Oct 18 09:44:31 2010 +0800
@@ -64,7 +64,7 @@
bool startBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
QList<FmBkupBackupCategory*> backupCategoryList,
- QString drive, quint32 content);
+ QString drive, quint32 content);
void cancelBackup();
int deleteBackup( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
@@ -74,7 +74,7 @@
int error();
//
- bool StartRestoreL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
+ bool startRestore( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
void GetRestoreInfoArray( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
QList< FmRestoreInfo > &restoreInfoList,
const QString& aDrive );
@@ -89,6 +89,11 @@
void notifyMemoryLow( int memoryValue, int &userError );
void notifyBackupFilesExist( bool &isContinue );
private:
+ bool startBackupL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
+ QList<FmBkupBackupCategory*> backupCategoryList,
+ QString drive, quint32 content);
+ bool startRestoreL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
+ int deleteBackupL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
void notifyPreparingInternal();
void notifyStartInternal( int aTotalCount );
void notifyUpdateInternal( int aCount );
--- a/filemanager/src/fmbkupenginewrapper/private/win32/fmbkupengine_p.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/private/win32/fmbkupengine_p.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -81,8 +81,8 @@
mError = FmErrNone;
selection.clear();
- FmRestoreSettings& rstSettings( *( q->RestoreSettingsL() ) );
- rstSettings.GetSelectionL( selection );
+ FmRestoreSettings& rstSettings( *( q->RestoreSettings() ) );
+ rstSettings.GetSelection( selection );
QSettings settings("Nokia", "FileManager");
foreach( FmRestoreInfo restoreInfo, selection ) {
switch( restoreInfo.content() )
@@ -135,11 +135,11 @@
}
//
-bool FmBkupEnginePrivate::StartRestoreL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
+bool FmBkupEnginePrivate::startRestore( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
{
selection.clear();
- FmRestoreSettings& rstSettings( *( q->RestoreSettingsL() ) );
- rstSettings.GetSelectionL( selection );
+ FmRestoreSettings& rstSettings( *( q->RestoreSettings() ) );
+ rstSettings.GetSelection( selection );
mError = mBkupThread->asyncRestore( drivesAndOperationList,selection );
return ( mError == FmErrNone );
--- a/filemanager/src/fmbkupenginewrapper/private/win32/fmbkupengine_p.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/private/win32/fmbkupengine_p.h Mon Oct 18 09:44:31 2010 +0800
@@ -53,7 +53,7 @@
int error();
//
- bool StartRestoreL( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
+ bool startRestore( QList<FmBkupDrivesAndOperation* > drivesAndOperationList );
void GetRestoreInfoArray( QList<FmBkupDrivesAndOperation* > drivesAndOperationList,
QList< FmRestoreInfo > &restoreInfoList,
const QString& aDrive );
--- a/filemanager/src/fmbkupenginewrapper/src/fmbkupengine.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/src/fmbkupengine.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -53,22 +53,23 @@
{
return d->startBackup( drivesAndOperationList, backupCategoryList, drive, content );
}
+
void FmBkupEngine::cancelBackup()
{
d->cancelBackup();
}
+
bool FmBkupEngine::startRestore( QList<FmBkupDrivesAndOperation* > drivesAndOperationList )
-{
- return d->StartRestoreL( drivesAndOperationList );
+{
+ return d->startRestore( drivesAndOperationList );
}
-
int FmBkupEngine::error() const
{
return d->error();
}
-FmBackupSettings *FmBkupEngine::BackupSettingsL()
+FmBackupSettings *FmBkupEngine::BackupSettings()
{
if ( !iBackupSettings )
{
@@ -77,7 +78,7 @@
return iBackupSettings;
}
-FmRestoreSettings *FmBkupEngine::RestoreSettingsL()
+FmRestoreSettings *FmBkupEngine::RestoreSettings()
{
if ( !iRestoreSettings )
{
--- a/filemanager/src/fmbkupenginewrapper/src/fmrestoresettings.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/fmbkupenginewrapper/src/fmrestoresettings.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -60,7 +60,7 @@
QList< FmRestoreInfo > restoreInfoList;
- QString targetDrive = mEngine.BackupSettingsL()->availableTargetDrive();
+ QString targetDrive = mEngine.BackupSettings()->availableTargetDrive();
mEngine.GetRestoreInfoArray( drivesAndOperationList, restoreInfoList, targetDrive );
@@ -98,7 +98,7 @@
iSelection = aSelection;
}
-void FmRestoreSettings::GetSelectionL(
+void FmRestoreSettings::GetSelection(
QList< FmRestoreInfo >& infoArray ) const
{
infoArray.clear();
--- a/filemanager/src/inc/fmfilesystemproxymodel.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmfilesystemproxymodel.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -20,6 +20,7 @@
#include <QFileSystemModel>
#include <hbglobal.h>
+#include <hbdirectorynamelocalizer.h>
// name column number, this define comes from implementation of QFileSystemModel
const int NameColumn = 0;
@@ -28,9 +29,9 @@
Constructor
*/
FmFileSystemProxyModel::FmFileSystemProxyModel( QObject *parent ) :
- QSortFilterProxyModel( parent )
+ QSortFilterProxyModel( parent ), localizer( 0 )
{
-
+ localizer = new HbDirectoryNameLocalizer;
}
/*!
@@ -38,7 +39,7 @@
*/
FmFileSystemProxyModel::~FmFileSystemProxyModel()
{
-
+ delete localizer;
}
/*!
@@ -50,11 +51,15 @@
QAbstractItemModel *itemModel = sourceModel();
QFileSystemModel *sourceModel = qobject_cast<QFileSystemModel*>( itemModel );
if( sourceModel && ( role == Qt::DisplayRole ) ) {
- QString name( FmUtils::localize(sourceModel->fileInfo( mapToSource( index ) ).absoluteFilePath()) );
- if( name.isEmpty() ) {
+ // get absolute path
+ QString path( sourceModel->fileInfo( mapToSource( index ) ).absoluteFilePath() );
+ // get localized name
+ QString localizedName( localizer->translate( path ) );
+
+ if( localizedName.isEmpty() ) {
return sourceModel->data( mapToSource( index ), role );
} else {
- return name;
+ return localizedName;
}
}
if( sourceModel )
--- a/filemanager/src/inc/fmfilesystemproxymodel.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmfilesystemproxymodel.h Mon Oct 18 09:44:31 2010 +0800
@@ -24,6 +24,8 @@
#include <QModelIndex>
#include <QSortFilterProxyModel>
+class HbDirectoryNameLocalizer;
+
/*!
\class FmFileSystemProxyModel
\brief The class FmFileSystemProxyModel provide file system model
@@ -48,6 +50,10 @@
private:
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+
+private:
+ // used to get localized directory name
+ HbDirectoryNameLocalizer *localizer;
};
--- a/filemanager/src/inc/fmfiletyperecognizer.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmfiletyperecognizer.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -49,6 +49,7 @@
mFileExtensionMap.insert( QString( "3g2" ), FileTypeVideo );
mFileExtensionMap.insert( QString( "rmvb" ),FileTypeVideo );
mFileExtensionMap.insert( QString( "mkv" ), FileTypeVideo );
+ mFileExtensionMap.insert( QString( "avi" ), FileTypeVideo );
mFileExtensionMap.insert( QString( "3gpp" ),FileTypeVideo );
mFileExtensionMap.insert( QString( "mpeg4"),FileTypeVideo );
@@ -69,6 +70,7 @@
mFileExtensionMap.insert( QString( "m4a" ), FileTypeTone );
mFileExtensionMap.insert( QString( "ott" ), FileTypeTone );
mFileExtensionMap.insert( QString( "mxmf" ),FileTypeTone );
+ mFileExtensionMap.insert( QString( "mka" ), FileTypeTone );
mFileExtensionMap.insert( QString( "doc" ), FileTypeText );
mFileExtensionMap.insert( QString( "pdf" ), FileTypeText );
--- a/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilshandler.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilshandler.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -37,14 +37,11 @@
#include <QSettings>
#include <XQConversions>
-// CONSTANTS
-const TInt KAppCloseTimeout = 1000000;
-
/*!
constructor.
*/
CFmServiceUtilsHandler::CFmServiceUtilsHandler() :
- CActive( CActive::EPriorityStandard )
+ CActive( CActive::EPriorityStandard ), iObserver( 0 )
{
}
@@ -95,21 +92,25 @@
\sa CActive
*/
void CFmServiceUtilsHandler::RunL()
- {
- iWait.AsyncStop();
+{
TInt err( iStatus.Int() );
+ if( iObserver ) {
+ TRAP_IGNORE( iObserver->handleCloseAppCompleteL( err ) );
}
+}
/*
\sa CActive
*/
-TInt CFmServiceUtilsHandler::RunError( TInt /*aError*/ )
+TInt CFmServiceUtilsHandler::RunError( TInt aError )
{
- iWait.AsyncStop();
+ if( iObserver ) {
+ TRAP_IGNORE( iObserver->handleCloseAppCompleteL( aError ) );
+ }
return KErrNone;
}
-/*
+/*!
Call CBaBackupSessionWrapper to close apps
this is synchronous which will take a while, please call this function in thread
*/
@@ -128,17 +129,9 @@
iBSWrapper->NotifyBackupOperationL( atts );
iBSWrapper->CloseAll( MBackupObserver::EReleaseLockNoAccess, iStatus );
SetActive();
-
- // Memory card formatting cannot be executed if there are open files on it.
- // It has been detected, that in some cases memory card using applications
- // have no time to close file handles before formatting is tried to be executed.
- // To address this issue, we need to add a delay here after client-notification
- // about pending format and real formatting procedure.
- User::After( KAppCloseTimeout );
- StartWait();
}
-/*
+/*!
Call CBaBackupSessionWrapper to restart closed apps
this is synchronous which will return quickly.
*/
@@ -159,15 +152,12 @@
iBSWrapper = 0;
}
-/*
- wait till request returned in RunL
+/*!
+ set observer so that observer can be notified when operation is finished
*/
-void CFmServiceUtilsHandler::StartWait()
+void CFmServiceUtilsHandler::setObserver( MServiceUtilsObserver *observer )
{
- if ( iWait.IsStarted() != (TInt)ETrue )
- {
- iWait.Start();
- }
+ iObserver = observer;
}
// End of File
--- a/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilshandler.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilshandler.h Mon Oct 18 09:44:31 2010 +0800
@@ -29,6 +29,16 @@
#include <e32base.h>
#include <f32file.h>
+/*!
+ \class MServiceUtilsObserver
+ \brief The class MServiceUtilsObserver provide event to notify CloseApp complete
+*/
+class MServiceUtilsObserver
+{
+public:
+ // called when CloseAppsL operation complete
+ virtual void handleCloseAppCompleteL( TInt err ) = 0;
+};
// FORWARD DECLARATIONS
class CBaBackupSessionWrapper;
@@ -48,7 +58,8 @@
public: // New methods
void CloseAppsL();
void RestartAppsL();
-
+ void setObserver( MServiceUtilsObserver *observer );
+
private: // From CActive
void DoCancel();
void RunL();
@@ -58,7 +69,6 @@
CFmServiceUtilsHandler();
void ConstructL();
- void StartWait();
private: // Data
/**
@@ -80,6 +90,8 @@
* Wait is used to change asynchronous function to synchronous function
*/
CActiveSchedulerWait iWait;
+
+ MServiceUtilsObserver *iObserver;
};
#endif
--- a/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilsprivate.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilsprivate.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -22,10 +22,14 @@
#include <shareui.h>
#include <afactivitystorage.h>
-FmServiceUtilsPrivate::FmServiceUtilsPrivate()
- :mShareUi( 0 ), mServiceUtilsHandler( 0 ), mActivityStorage( 0 )
+// CONSTANTS
+const int KAppCloseMiniSecTimeout = 1000;
+
+FmServiceUtilsPrivate::FmServiceUtilsPrivate( QObject *parent ) : QObject( parent ),
+ mShareUi( 0 ), mServiceUtilsHandler( 0 ), mActivityStorage( 0 ),
+ mIsCloseAppsFinished( false ), mIsCloseAppsTimeup( false )
{
-
+ connect(&mCloseAppTimer, SIGNAL(timeout()), this, SLOT(onCloseAppTimeup()));
}
FmServiceUtilsPrivate::~FmServiceUtilsPrivate()
@@ -75,7 +79,9 @@
{
if( !mServiceUtilsHandler ) {
TRAPD(err, mServiceUtilsHandler = CFmServiceUtilsHandler::NewL());
- if( err != KErrNone ) {
+ if( err == KErrNone ) {
+ mServiceUtilsHandler->setObserver( this );
+ } else {
mServiceUtilsHandler = 0;
}
}
@@ -98,9 +104,47 @@
void FmServiceUtilsPrivate::closeApps()
{
CFmServiceUtilsHandler *utilsHandler = serviceUtilsHandler();
+ mIsCloseAppsFinished = false;
+ mIsCloseAppsTimeup = false;
if( utilsHandler ) {
TRAP_IGNORE( utilsHandler->CloseAppsL() );
}
+
+ // Memory card formatting cannot be executed if there are open files on it.
+ // It has been detected, that in some cases memory card using applications
+ // have no time to close file handles before formatting is tried to be executed.
+ // To address this issue, we need to add a delay here after client-notification
+ // about pending format and real formatting procedure.
+ mCloseAppTimer.start( KAppCloseMiniSecTimeout );
+
+ //loop will be closed on both mIsCloseAppsFinished and mIsCloseAppsTimeup turned to true
+ mCloseAppLoop.exec();
+}
+
+/*
+ This is observer function inherit from MServiceUtilsObserver
+ So end with L letter no matter if it will leave
+ handle close apps complete, exit loop if mIsCloseAppsTimeup is true
+*/
+void FmServiceUtilsPrivate::handleCloseAppCompleteL( TInt err )
+{
+ Q_UNUSED( err );
+ mIsCloseAppsFinished = true;
+ if( mIsCloseAppsTimeup ) {
+ mCloseAppLoop.exit();
+ }
+}
+
+/*
+ handle close apps time up. exit loop if mIsCloseAppsFinished is true
+*/
+void FmServiceUtilsPrivate::onCloseAppTimeup()
+{
+ mCloseAppTimer.stop();
+ mIsCloseAppsTimeup = true;
+ if( mIsCloseAppsFinished ) {
+ mCloseAppLoop.exit();
+ }
}
/*!
@@ -131,4 +175,3 @@
{
return activityStorage()->removeActivity( activityId );
}
-
--- a/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilsprivate.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmserviceutils/private/symbian/fmserviceutilsprivate.h Mon Oct 18 09:44:31 2010 +0800
@@ -19,24 +19,30 @@
#ifndef FMSERVICEUTILSPRIVATE_H
#define FMSERVICEUTILSPRIVATE_H
+#include <QTimer>
#include <QObject>
#include <QVariant>
+#include <QEventLoop>
#include <QStringList>
#include <QVariantHash>
+#include "fmserviceutilshandler.h"
+
+
class ShareUi;
class AfActivityStorage;
-class CFmServiceUtilsHandler;
+
/*!
\class FmServiceUtilsPrivate
\brief The class FmServiceUtilsPrivate provide service utils APIs private wrapper
*/
-class FmServiceUtilsPrivate
+class FmServiceUtilsPrivate : public QObject, public MServiceUtilsObserver
{
+Q_OBJECT
public:
- FmServiceUtilsPrivate();
+ explicit FmServiceUtilsPrivate( QObject *parent=0 );
virtual ~FmServiceUtilsPrivate();
void sendFile( const QStringList &filePath );
@@ -46,12 +52,17 @@
// activity implement
bool saveActivity(const QString &activityId, const QVariant &activityData, const QVariantHash &metadata);
bool removeActivity(const QString &activityId);
+private slots:
+ void onCloseAppTimeup();
private:
ShareUi *shareUi();
AfActivityStorage *activityStorage();
CFmServiceUtilsHandler *serviceUtilsHandler();
+ virtual void handleCloseAppCompleteL( TInt err );
+
+
private:
// used to send files
ShareUi *mShareUi;
@@ -60,7 +71,13 @@
CFmServiceUtilsHandler *mServiceUtilsHandler;
//own used to save activity.
- AfActivityStorage *mActivityStorage;
+ AfActivityStorage *mActivityStorage;
+ QEventLoop mCloseAppLoop;
+ QTimer mCloseAppTimer;
+
+ bool mIsCloseAppsFinished;
+ bool mIsCloseAppsTimeup;
+
};
#endif
--- a/filemanager/src/inc/fmserviceutils/private/win32/fmserviceutilsprivate.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmserviceutils/private/win32/fmserviceutilsprivate.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -18,11 +18,15 @@
#include "fmserviceutilsprivate.h"
+// CONSTANTS
+const int KAppCloseMiniSecTimeout = 1000;
+
/*!
constructor
*/
-FmServiceUtilsPrivate::FmServiceUtilsPrivate()
+FmServiceUtilsPrivate::FmServiceUtilsPrivate( QObject *parent ) : QObject( parent )
{
+ connect(&mCloseAppTimer, SIGNAL(timeout()), this, SLOT(onCloseAppTimeup()));
}
/*!
@@ -45,7 +49,8 @@
*/
void FmServiceUtilsPrivate::closeApps()
{
-
+ mCloseAppTimer.start( KAppCloseMiniSecTimeout );
+ mCloseAppLoop.exec();
}
/*!
@@ -56,6 +61,11 @@
}
+void FmServiceUtilsPrivate::onCloseAppTimeup()
+{
+ mCloseAppLoop.exit();
+}
+
/*!
dummy function for win32 build
*/
--- a/filemanager/src/inc/fmserviceutils/private/win32/fmserviceutilsprivate.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmserviceutils/private/win32/fmserviceutilsprivate.h Mon Oct 18 09:44:31 2010 +0800
@@ -22,11 +22,14 @@
#include <QStringList>
#include <QVariant>
#include <QVariantHash>
+#include <QEventLoop>
+#include <QTimer>
-class FmServiceUtilsPrivate
+class FmServiceUtilsPrivate : public QObject
{
+Q_OBJECT
public:
- FmServiceUtilsPrivate();
+ FmServiceUtilsPrivate( QObject *parent = 0 );
virtual ~FmServiceUtilsPrivate();
void sendFile( const QStringList &filePathList );
@@ -36,6 +39,14 @@
// activity implement
bool saveActivity(const QString &activityId, const QVariant &activityData, const QVariantHash &metadata);
bool removeActivity(const QString &activityId);
+private slots:
+ void onCloseAppTimeup();
+
+private:
+ QEventLoop mCloseAppLoop;
+ QTimer mCloseAppTimer;
+
+ bool mIsCloseAppsTimeup;
};
#endif
--- a/filemanager/src/inc/fmutils.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/src/inc/fmutils.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -260,16 +260,16 @@
switch ( driverInfo.driveType() )
{
case FmDriverInfo::EDriveTypeMassStorage:
- defaultVolumeName = hbTrId("Mass storage");
+ defaultVolumeName = hbTrId("txt_fmgr_mass_memory_default");
break;
case FmDriverInfo::EDriveTypeUsbMemory:
- defaultVolumeName = hbTrId("USB memory");
+ defaultVolumeName = hbTrId("txt_fmgr_usb_memory_default");
break;
case FmDriverInfo::EDriveTypeMemoryCard:
- defaultVolumeName = hbTrId("Memory card");
+ defaultVolumeName = hbTrId("txt_fmgr_memory_card_default");
break;
case FmDriverInfo::EDriveTypePhoneMemory:
- defaultVolumeName = hbTrId("Device memory");
+ defaultVolumeName = hbTrId("txt_fmgr_device_memory_default");
break;
case FmDriverInfo::EDriveTypeNotExist:// no such drive, break and return empty string
default:// do not have default volume for other drive types, e.g. Ram, Rom
@@ -297,16 +297,16 @@
switch ( driverInfo.driveType() )
{
case FmDriverInfo::EDriveTypeMassStorage:
- volumeName = hbTrId("Mass storage");
+ volumeName = hbTrId("txt_fmgr_mass_memory_default");
break;
case FmDriverInfo::EDriveTypeUsbMemory:
- volumeName = hbTrId("USB memory");
+ volumeName = hbTrId("txt_fmgr_usb_memory_default");
break;
case FmDriverInfo::EDriveTypeMemoryCard:
- volumeName = hbTrId("Memory card");
+ volumeName = hbTrId("txt_fmgr_memory_card_default");
break;
case FmDriverInfo::EDriveTypePhoneMemory:
- volumeName = hbTrId("Device memory");
+ volumeName = hbTrId("txt_fmgr_device_memory_default");
break;
case FmDriverInfo::EDriveTypeNotExist:// no such drive
default:// do not need get volume for other drive types, e.g. Ram, Rom
--- a/filemanager/tsrc/unit/ut_fminternaldrivermodel/src/testclassdatafmdrivelistprovider.h Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fminternaldrivermodel/src/testclassdatafmdrivelistprovider.h Mon Oct 18 09:44:31 2010 +0800
@@ -1,9 +1,19 @@
/*
- * testDataClassFmDriveListProvider.h
- *
- * Created on: Jul 13, 2010
- *
- */
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:The class is used for the unit test cases.
+*
+*/
#ifndef TESTCLASSDATAFMDRIVELISTPROVIDER_H
#define TESTCLASSDATAFMDRIVELISTPROVIDER_H
--- a/filemanager/tsrc/unit/ut_fminternalfmutils/src/ut_fminternalfmutils.cpp Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fminternalfmutils/src/ut_fminternalfmutils.cpp Mon Oct 18 09:44:31 2010 +0800
@@ -569,16 +569,16 @@
switch ( driverInfo.driveType() )
{
case FmDriverInfo::EDriveTypeMassStorage:
- QVERIFY(retDriveVolume == hbTrId("Mass storage"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_mass_memory_default"));
break;
case FmDriverInfo::EDriveTypeUsbMemory:
- QVERIFY(retDriveVolume == hbTrId("USB memory"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_usb_memory_default"));
break;
case FmDriverInfo::EDriveTypeMemoryCard:
- QVERIFY(retDriveVolume == hbTrId("Memory card"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_memory_card_default"));
break;
case FmDriverInfo::EDriveTypePhoneMemory:
- QVERIFY(retDriveVolume == hbTrId("Device memory"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_device_memory_default"));
break;
case FmDriverInfo::EDriveTypeNotExist:
default:
@@ -610,16 +610,16 @@
switch ( driverInfo.driveType() )
{
case FmDriverInfo::EDriveTypeMassStorage:
- QVERIFY(retDriveVolume == hbTrId("Mass storage"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_mass_memory_default"));
break;
case FmDriverInfo::EDriveTypeUsbMemory:
- QVERIFY(retDriveVolume == hbTrId("USB memory"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_usb_memory_default"));
break;
case FmDriverInfo::EDriveTypeMemoryCard:
- QVERIFY(retDriveVolume == hbTrId("Memory card"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_memory_card_default"));
break;
case FmDriverInfo::EDriveTypePhoneMemory:
- QVERIFY(retDriveVolume == hbTrId("Device memory"));
+ QVERIFY(retDriveVolume == hbTrId("txt_fmgr_device_memory_default"));
break;
case FmDriverInfo::EDriveTypeNotExist:
default:
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/dataforcopy.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/dataforcopy.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
-for copy.
\ No newline at end of file
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
+data for copy.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/dataformove.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/dataformove.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
test data for asyncMove.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesforcopy/copydata1.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesforcopy/copydata1.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
this is the data for copy muliti-files.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesforcopy/copydata2.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesforcopy/copydata2.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
this is the data for copy muliti-files.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesforcopy/copydata3.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesforcopy/copydata3.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
this is the data for copy muliti-files.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesformove/movedata1.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesformove/movedata1.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
this file is for multi-move.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesformove/movedata2.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesformove/movedata2.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
this file is for multi-move.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesformove/movedata3.txt Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/data/multifilesformove/movedata3.txt Mon Oct 18 09:44:31 2010 +0800
@@ -1,1 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:This is the test data for unit test cases.
+*
+*/
+
this file is for multi-move.
\ No newline at end of file
--- a/filemanager/tsrc/unit/ut_fmoprationserviceapi/ut_fmoperationserviceapi.pri Thu Sep 30 16:33:59 2010 +0800
+++ b/filemanager/tsrc/unit/ut_fmoprationserviceapi/ut_fmoperationserviceapi.pri Mon Oct 18 09:44:31 2010 +0800
@@ -38,7 +38,7 @@
HEADERS += src/ut_fmoprationserviceapi.h \
src/testviewmanager.h \
../../../src/filemanager/src/fmdriverlistwidget.h \
-# ../../../src/filemanager/src/listviewitems.h \
+ ../../../src/filemanager/src/fmapplication.h \
../../../src/filemanager/src/fmfileview.h \
../../../src/filemanager/src/fmfilebrowsewidget.h \
../../../src/filemanager/src/fmdriverview.h \
@@ -83,7 +83,7 @@
SOURCES += src/ut_fmoprationserviceapi.cpp \
src/testviewmanager.cpp \
../../../src/filemanager/src/fmdriverlistwidget.cpp \
-# ../../../src/filemanager/src/listviewitems.cpp \
+ ../../../src/filemanager/src/fmapplication.cpp \
../../../src/filemanager/src/fmfileview.cpp \
../../../src/filemanager/src/fmfilebrowsewidget.cpp \
../../../src/filemanager/src/fmdriverview.cpp \