--- a/mediasettings/videosettingsplugin/inc/videosettingsaccesspointentry.h Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/inc/videosettingsaccesspointentry.h Fri Oct 15 16:29:10 2010 +0300
@@ -17,14 +17,14 @@
#ifndef VIDEOSETTINGSACCESSPOINTENTRY_H
#define VIDEOSETTINGSACCESSPOINTENTRY_H
-#include <cpsettingformentryitemdata.h>
+#include <cpsettingformitemdata.h>
#include <cmapplsettingsui.h>
class VideoSettingsGroup;
class CmConnectionMethodShim;
class CmManagerShim;
-class VideoSettingsAccessPointEntry : public CpSettingFormEntryItemData
+class VideoSettingsAccessPointEntry : public CpSettingFormItemData
{
Q_OBJECT
public:
@@ -33,8 +33,8 @@
* Constructor
*/
VideoSettingsAccessPointEntry(CpItemDataHelper &itemDataHelper,
- const QString& text = QString(),
- VideoSettingsGroup *parent = 0);
+ const QString &labelText = QString(),
+ VideoSettingsGroup *parent = 0);
/**
* Destructor
@@ -49,15 +49,7 @@
void setIapId(const uint& apId);
private:
-
- /**
- * From CpSettingFormEntryItemData.
- *
- * Creates a view for this, if needed. In our case always
- * returns 0 as we don't want a new view.
- */
- virtual CpBaseSettingView *createSettingView() const;
-
+
/**
* Convinience method for fetching a connection method
* with a given id.
--- a/mediasettings/videosettingsplugin/src/videosettingsaccesspointentry.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/src/videosettingsaccesspointentry.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -11,7 +11,10 @@
*
* Contributors:
*
- * Description:
+ * Description: This class is HbDataFormModelItem::ToggleValueItem type item which is
+ * used to launch access point selection dialog. Toggle functionality is
+ * not used. This class type is used just because it offers correct look
+ * and offers data modify capabilities.
*
*/
@@ -27,21 +30,22 @@
// ---------------------------------------------------------------------------
//
VideoSettingsAccessPointEntry::VideoSettingsAccessPointEntry(
- CpItemDataHelper &itemDataHelper,
- const QString& text,
- VideoSettingsGroup *parent) :
- CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem,
- itemDataHelper, text, QString(), QString(), parent),
- mParent(parent)
+ CpItemDataHelper &itemDataHelper,
+ const QString& labelText,
+ VideoSettingsGroup *parent) :
+CpSettingFormItemData(HbDataFormModelItem::ToggleValueItem, labelText, parent),
+mParent(parent)
{
MPX_ENTER_EXIT(_L("VideoSettingsAccessPointEntry::VideoSettingsAccessPointEntry()"));
-
- itemDataHelper.addConnection(this,SIGNAL(clicked()),this,SLOT(openSelectionDialogSlot()));
+
+ itemDataHelper.addConnection(this, SIGNAL(valueChanged(QPersistentModelIndex, QVariant)),
+ this, SLOT(openSelectionDialogSlot()));
+
mApplSettings = new CmApplSettingsUi(this);
connect(mApplSettings, SIGNAL(finished(uint)), this, SLOT(accessPointDialogFinished(uint)));
mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
mSelection.id = 0;
- mCmManager = new CmManagerShim();
+ mCmManager = new CmManagerShim();
}
// ---------------------------------------------------------------------------
@@ -82,23 +86,16 @@
if(!found)
{
- this->setDescription(hbTrId("txt_videos_dblist_none"));
+ QString name(hbTrId("txt_videos_dblist_none"));
+
+ // Our widget is "toggle type", so we have to store data to both fields
+ // to keep it show the same value, no matter how user toggless it.
+ setContentWidgetData("text", QVariant(name));
+ setContentWidgetData("additionalText", QVariant(name));
}
}
// ---------------------------------------------------------------------------
-// createSettingView
-// ---------------------------------------------------------------------------
-//
-CpBaseSettingView* VideoSettingsAccessPointEntry::createSettingView() const
-{
- MPX_ENTER_EXIT(_L("VideoSettingsAccessPointEntry::createSettingView()"));
-
- // does not create a new view.
- return 0;
-}
-
-// ---------------------------------------------------------------------------
// getConnectionMethod
// ---------------------------------------------------------------------------
//
@@ -126,7 +123,11 @@
MPX_ENTER_EXIT(_L("VideoSettingsAccessPointEntry::setAccessPointName()"));
QString name = connMethod->getStringAttribute(CMManagerShim::CmName);
- this->setDescription(name);
+
+ // Our widget is "toggle type", so we have to store data to both fields
+ // to keep it show the same value, no matter how user toggless it.
+ setContentWidgetData("text", QVariant(name));
+ setContentWidgetData("additionalText", QVariant(name));
}
// ---------------------------------------------------------------------------
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/inc/testaccesspointentry.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* 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: TestAccessPointEntry class definition
+*
+*/
+
+#ifndef TESTACCESSPOINTENTRY_H
+#define TESTACCESSPOINTENTRY_H
+
+
+// INCLUDES
+#include <qobject.h>
+
+class CpItemDataHelper;
+class VideoSettingsAccessPointEntry;
+class VideoSettingsGroup;
+
+class TestAccessPointEntry : public QObject
+ {
+
+ Q_OBJECT
+
+signals:
+
+ void testSignal();
+
+private slots:
+
+ /**
+ * called at the very beginning of the test
+ */
+ void initTestCase();
+
+ /**
+ * called at the very end of the test
+ */
+ void cleanupTestCase();
+
+ /**
+ * called at the start of every test.
+ */
+ void init();
+
+ /**
+ * called at the end of every test.
+ */
+ void cleanup();
+
+ /**
+ * tests constructor
+ */
+ void testConstructor();
+
+ /**
+ * tests destructor
+ */
+ void testDestructor();
+
+ /**
+ * tests setIapId
+ */
+ void testSetIapId();
+
+ /**
+ * tests createSettingsView
+ */
+ void testCreateSettingView();
+
+ /**
+ * tests openSelectionDialogSlot
+ */
+ void testOpenSelectionDialogSlot();
+
+ /**
+ * tests accessPointDialogFinished
+ */
+ void testAccessPointDialogFinished();
+
+private:
+
+ CpItemDataHelper* mItemHelper;
+
+ VideoSettingsGroup* mGroup;
+
+ VideoSettingsAccessPointEntry* mTestObject;
+
+ };
+
+#endif // TESTACCESSPOINTENTRY_H
+
+// End of File
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/inc/testvideosettingsaccesspointentry.h Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* 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: TestVideoSettingsAccessPointEntry class definition
-*
-*/
-
-#ifndef TESTVIDEOSETTINGSACCESSPOINTENTRY_H
-#define TESTVIDEOSETTINGSACCESSPOINTENTRY_H
-
-
-// INCLUDES
-#include <qobject.h>
-
-class CpItemDataHelper;
-class VideoSettingsAccessPointEntry;
-class VideoSettingsGroup;
-
-class TestVideoSettingsAccessPointEntry : public QObject
- {
-
- Q_OBJECT
-
-signals:
-
- void testSignal();
-
-private slots:
-
- /**
- * called at the very beginning of the test
- */
- void initTestCase();
-
- /**
- * called at the very end of the test
- */
- void cleanupTestCase();
-
- /**
- * called at the start of every test.
- */
- void init();
-
- /**
- * called at the end of every test.
- */
- void cleanup();
-
- /**
- * tests constructor
- */
- void testConstructor();
-
- /**
- * tests destructor
- */
- void testDestructor();
-
- /**
- * tests setIapId
- */
- void testSetIapId();
-
- /**
- * tests createSettingsView
- */
- void testCreateSettingView();
-
- /**
- * tests openSelectionDialogSlot
- */
- void testOpenSelectionDialogSlot();
-
- /**
- * tests accessPointDialogFinished
- */
- void testAccessPointDialogFinished();
-
-private:
-
- CpItemDataHelper* mItemHelper;
-
- VideoSettingsGroup* mGroup;
-
- VideoSettingsAccessPointEntry* mTestObject;
-
- };
-
-#endif // TESTVIDEOSETTINGSACCESSPOINTENTRY_H
-
-// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/src/testaccesspointentry.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,250 @@
+/*
+* 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: TestAccessPointEntry class implementation
+*
+*/
+
+// INCLUDE FILES
+#include <QtTest/QtTest>
+#include <qdebug.h>
+#include <hbapplication.h>
+
+
+#include "stub/inc/cpitemdatahelper.h"
+#include "stub/inc/cpsettingformentryitemdata.h"
+#include "stub/inc/cmapplsettingsui.h"
+#include "stub/inc/cmconnectionmethod_shim.h"
+#include "stub/inc/cmmanager_shim.h"
+#include "stub/inc/videosettingsgroup.h"
+
+#include "testaccesspointentry.h"
+#include "videosettingsgroup.h"
+#include "cmmanager_shim.h"
+#include "cmconnectionmethod_shim.h"
+
+// trick to get access to protected/private members.
+#define private public
+#include "videosettingsaccesspointentry.h"
+#undef private
+
+// ---------------------------------------------------------------------------
+// initTestCase
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::initTestCase()
+{
+ mItemHelper = new CpItemDataHelper;
+ mGroup = new VideoSettingsGroup(*mItemHelper);
+}
+
+// ---------------------------------------------------------------------------
+// cleanupTestCase
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::cleanupTestCase()
+{
+ delete mGroup;
+ mGroup = 0;
+ delete mItemHelper;
+ mItemHelper = 0;
+}
+
+// ---------------------------------------------------------------------------
+// init
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::init()
+{
+ mTestObject = new VideoSettingsAccessPointEntry(*mItemHelper, QString("test"), mGroup);
+}
+
+// ---------------------------------------------------------------------------
+// cleanup
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::cleanup()
+{
+ delete mTestObject;
+ mTestObject = 0;
+}
+
+// ---------------------------------------------------------------------------
+// testConstructor
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::testConstructor()
+{
+ // verify clicked signal connection.
+ ConnectionHolder connection = mItemHelper->mConnections[mTestObject];
+ QCOMPARE( connection.signal, SIGNAL(clicked()) );
+ QVERIFY( connection.receiver == mTestObject );
+ QCOMPARE( connection.method, SLOT(openSelectionDialogSlot()) );
+
+ // verify mApplSettings construction
+ QVERIFY( mTestObject->mApplSettings );
+ QVERIFY( disconnect(mTestObject->mApplSettings, SIGNAL(finished(uint)), mTestObject, SLOT(accessPointDialogFinished(uint))) );
+ connect(mTestObject->mApplSettings, SIGNAL(finished(uint)), mTestObject, SLOT(accessPointDialogFinished(uint)));
+
+ // verify mSelection initial values
+ QVERIFY( mTestObject->mSelection.result == CmApplSettingsUi::SelectionTypeConnectionMethod );
+ QVERIFY( mTestObject->mSelection.id == 0 );
+
+ // verify CmManagerShim construction
+ QVERIFY( mTestObject->mCmManager );
+
+ // verify base class 'construction'
+ QCOMPARE( mTestObject->mText, QString("test") );
+ QVERIFY( mTestObject->mDescription.isNull() );
+}
+
+// ---------------------------------------------------------------------------
+// testConstructor
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::testDestructor()
+{
+ CmManagerShim::mDestructorCount = 0;
+ cleanup();
+ QCOMPARE( CmManagerShim::mDestructorCount, 1 );
+}
+
+// ---------------------------------------------------------------------------
+// testSetIapId
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::testSetIapId()
+{
+ // with empty cmArray
+ mTestObject->setIapId(5);
+ QCOMPARE( mTestObject->mDescription, hbTrId("txt_videos_dblist_none") );
+
+ // with non-empty cmArray, but id is not found.
+ mTestObject->mCmManager->mConnectionMethods[0] = new CmConnectionMethodShim(0, 4, QString("0"));
+ mTestObject->mCmManager->mConnectionMethods[2] = new CmConnectionMethodShim(2, 6, QString("2"));
+ mTestObject->setIapId(5);
+ QCOMPARE( mTestObject->mDescription, hbTrId("txt_videos_dblist_none") );
+
+ // with non-empty cmArray, and id is found, but CmManagerShim throws at that id.
+ mTestObject->mCmManager->mConnectionMethods[1] = new CmConnectionMethodShim(1, 5, QString("1"));
+ CmManagerShim::mConnectionMethodThrowsAtId = 1;
+ mTestObject->setIapId(5);
+ QCOMPARE( mTestObject->mDescription, hbTrId("txt_videos_dblist_none") );
+
+ // with non-empty cmArray, and id is found.
+ CmManagerShim::mConnectionMethodThrowsAtId = -1;
+ mTestObject->setIapId(5);
+ QCOMPARE( mTestObject->mDescription, QString("1") );
+
+ // with non-empty cmArray, and id is found, but CmManagerShim throws at id before.
+ CmManagerShim::mConnectionMethodThrowsAtId = 0;
+ mTestObject->mDescription = QString();
+ mTestObject->setIapId(5);
+ QCOMPARE( mTestObject->mDescription, QString("1") );
+
+ // with non-empty cmArray, and id is found, but CmManagerShim throws at id after.
+ CmManagerShim::mConnectionMethodThrowsAtId = 2;
+ mTestObject->mDescription = QString();
+ mTestObject->setIapId(5);
+ QCOMPARE( mTestObject->mDescription, QString("1") );
+}
+
+// ---------------------------------------------------------------------------
+// testCreateSettingView
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::testCreateSettingView()
+{
+ QVERIFY(mTestObject->callCreateSettingView() == 0 );
+}
+
+// ---------------------------------------------------------------------------
+// testOpenSelectionDialogSlot
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::testOpenSelectionDialogSlot()
+{
+ connect(this, SIGNAL(testSignal()), mTestObject, SLOT(openSelectionDialogSlot()));
+ QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+ filter.insert(1);
+ mTestObject->mApplSettings->mListItems = QFlags<CmApplSettingsUi::SelectionDialogItems>();
+ mTestObject->mApplSettings->mBearerTypeFilter = filter;
+ mTestObject->mApplSettings->mOpenCallAmount = 0;
+
+ emit testSignal();
+
+ QVERIFY( mTestObject->mApplSettings->mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods) );
+ QVERIFY( mTestObject->mApplSettings->mListItems.testFlag(CmApplSettingsUi::ShowDestinations) == false);
+ QCOMPARE( mTestObject->mApplSettings->mBearerTypeFilter.count(), 0);
+ QVERIFY( mTestObject->mApplSettings->mSelection.result == CmApplSettingsUi::SelectionTypeConnectionMethod );
+ QCOMPARE( mTestObject->mApplSettings->mOpenCallAmount, 1 );
+}
+
+// ---------------------------------------------------------------------------
+// testAccessPointDialogFinished
+// ---------------------------------------------------------------------------
+//
+void TestAccessPointEntry::testAccessPointDialogFinished()
+{
+ // error
+ mTestObject->mApplSettings->mSelection.id = 5;
+ mTestObject->mSelection.id = 0;
+ mTestObject->mDescription = QString();
+ mGroup->mApId = 0;
+
+ mTestObject->mApplSettings->emitFinished(CmApplSettingsUi::ApplSettingsErrorCancel);
+
+ QCOMPARE( mTestObject->mSelection.id, (uint)0 );
+
+ // no error
+ mTestObject->mDescription = QString();
+ mTestObject->mCmManager->mConnectionMethods[5] = new CmConnectionMethodShim(5, 4, QString("5"));
+
+ mTestObject->mApplSettings->emitFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+
+ QCOMPARE( mTestObject->mSelection.id, mTestObject->mApplSettings->mSelection.id );
+ QCOMPARE( mGroup->mApId, (uint)4 );
+ QCOMPARE( mTestObject->mDescription, QString("5") );
+
+ // no error, but CmManagerShim throws at that id.
+ mTestObject->mSelection.id = 0;
+ mTestObject->mDescription = QString();
+ mGroup->mApId = 0;
+ CmManagerShim::mConnectionMethodThrowsAtId = 5;
+
+ mTestObject->mApplSettings->emitFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+
+ QCOMPARE( mTestObject->mSelection.id, (uint)0 );
+ QCOMPARE( mGroup->mApId, (uint)0 );
+ QVERIFY( mTestObject->mDescription.isNull() );
+}
+
+// ---------------------------------------------------------------------------
+// main
+// ---------------------------------------------------------------------------
+//
+int main(int argc, char *argv[])
+{
+ HbApplication app(argc, argv);
+
+ TestAccessPointEntry tc;
+
+ char *pass[3];
+ pass[0] = argv[0];
+ pass[1] = "-o";
+ pass[2] = "c:\\data\\TestAccessPointEntry.txt";
+
+ return QTest::qExec(&tc, 3, pass);
+}
+
+// end of file
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/src/testvideosettingsaccesspointentry.cpp Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +0,0 @@
-/*
-* 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: TestVideoSettingsAccessPointEntry class implementation
-*
-*/
-
-// INCLUDE FILES
-#include <QtTest/QtTest>
-#include <qdebug.h>
-#include <hbapplication.h>
-#include <cpitemdatahelper.h>
-
-#include "testvideosettingsaccesspointentry.h"
-#include "videosettingsgroup.h"
-#include "cmmanager_shim.h"
-#include "cmconnectionmethod_shim.h"
-
-// trick to get access to protected/private members.
-#define private public
-#include "videosettingsaccesspointentry.h"
-#undef private
-
-// ---------------------------------------------------------------------------
-// initTestCase
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::initTestCase()
-{
- mItemHelper = new CpItemDataHelper;
- mGroup = new VideoSettingsGroup(*mItemHelper);
-}
-
-// ---------------------------------------------------------------------------
-// cleanupTestCase
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::cleanupTestCase()
-{
- delete mGroup;
- mGroup = 0;
- delete mItemHelper;
- mItemHelper = 0;
-}
-
-// ---------------------------------------------------------------------------
-// init
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::init()
-{
- mTestObject = new VideoSettingsAccessPointEntry(*mItemHelper, QString("test"), mGroup);
-}
-
-// ---------------------------------------------------------------------------
-// cleanup
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::cleanup()
-{
- delete mTestObject;
- mTestObject = 0;
-}
-
-// ---------------------------------------------------------------------------
-// testConstructor
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::testConstructor()
-{
- // verify clicked signal connection.
- ConnectionHolder connection = mItemHelper->mConnections[mTestObject];
- QCOMPARE( connection.signal, SIGNAL(clicked()) );
- QVERIFY( connection.receiver == mTestObject );
- QCOMPARE( connection.method, SLOT(openSelectionDialogSlot()) );
-
- // verify mApplSettings construction
- QVERIFY( mTestObject->mApplSettings );
- QVERIFY( disconnect(mTestObject->mApplSettings, SIGNAL(finished(uint)), mTestObject, SLOT(accessPointDialogFinished(uint))) );
- connect(mTestObject->mApplSettings, SIGNAL(finished(uint)), mTestObject, SLOT(accessPointDialogFinished(uint)));
-
- // verify mSelection initial values
- QVERIFY( mTestObject->mSelection.result == CmApplSettingsUi::SelectionTypeConnectionMethod );
- QVERIFY( mTestObject->mSelection.id == 0 );
-
- // verify CmManagerShim construction
- QVERIFY( mTestObject->mCmManager );
-
- // verify base class 'construction'
- QCOMPARE( mTestObject->mText, QString("test") );
- QVERIFY( mTestObject->mDescription.isNull() );
-}
-
-// ---------------------------------------------------------------------------
-// testConstructor
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::testDestructor()
-{
- CmManagerShim::mDestructorCount = 0;
- cleanup();
- QCOMPARE( CmManagerShim::mDestructorCount, 1 );
-}
-
-// ---------------------------------------------------------------------------
-// testSetIapId
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::testSetIapId()
-{
- // with empty cmArray
- mTestObject->setIapId(5);
- QCOMPARE( mTestObject->mDescription, hbTrId("txt_videos_dblist_none") );
-
- // with non-empty cmArray, but id is not found.
- mTestObject->mCmManager->mConnectionMethods[0] = new CmConnectionMethodShim(0, 4, QString("0"));
- mTestObject->mCmManager->mConnectionMethods[2] = new CmConnectionMethodShim(2, 6, QString("2"));
- mTestObject->setIapId(5);
- QCOMPARE( mTestObject->mDescription, hbTrId("txt_videos_dblist_none") );
-
- // with non-empty cmArray, and id is found, but CmManagerShim throws at that id.
- mTestObject->mCmManager->mConnectionMethods[1] = new CmConnectionMethodShim(1, 5, QString("1"));
- CmManagerShim::mConnectionMethodThrowsAtId = 1;
- mTestObject->setIapId(5);
- QCOMPARE( mTestObject->mDescription, hbTrId("txt_videos_dblist_none") );
-
- // with non-empty cmArray, and id is found.
- CmManagerShim::mConnectionMethodThrowsAtId = -1;
- mTestObject->setIapId(5);
- QCOMPARE( mTestObject->mDescription, QString("1") );
-
- // with non-empty cmArray, and id is found, but CmManagerShim throws at id before.
- CmManagerShim::mConnectionMethodThrowsAtId = 0;
- mTestObject->mDescription = QString();
- mTestObject->setIapId(5);
- QCOMPARE( mTestObject->mDescription, QString("1") );
-
- // with non-empty cmArray, and id is found, but CmManagerShim throws at id after.
- CmManagerShim::mConnectionMethodThrowsAtId = 2;
- mTestObject->mDescription = QString();
- mTestObject->setIapId(5);
- QCOMPARE( mTestObject->mDescription, QString("1") );
-}
-
-// ---------------------------------------------------------------------------
-// testCreateSettingView
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::testCreateSettingView()
-{
- QVERIFY(mTestObject->callCreateSettingView() == 0 );
-}
-
-// ---------------------------------------------------------------------------
-// testOpenSelectionDialogSlot
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::testOpenSelectionDialogSlot()
-{
- connect(this, SIGNAL(testSignal()), mTestObject, SLOT(openSelectionDialogSlot()));
- QSet<CmApplSettingsUi::BearerTypeFilter> filter;
- filter.insert(1);
- mTestObject->mApplSettings->mListItems = QFlags<CmApplSettingsUi::SelectionDialogItems>();
- mTestObject->mApplSettings->mBearerTypeFilter = filter;
- mTestObject->mApplSettings->mOpenCallAmount = 0;
-
- emit testSignal();
-
- QVERIFY( mTestObject->mApplSettings->mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods) );
- QVERIFY( mTestObject->mApplSettings->mListItems.testFlag(CmApplSettingsUi::ShowDestinations) == false);
- QCOMPARE( mTestObject->mApplSettings->mBearerTypeFilter.count(), 0);
- QVERIFY( mTestObject->mApplSettings->mSelection.result == CmApplSettingsUi::SelectionTypeConnectionMethod );
- QCOMPARE( mTestObject->mApplSettings->mOpenCallAmount, 1 );
-}
-
-// ---------------------------------------------------------------------------
-// testAccessPointDialogFinished
-// ---------------------------------------------------------------------------
-//
-void TestVideoSettingsAccessPointEntry::testAccessPointDialogFinished()
-{
- // error
- mTestObject->mApplSettings->mSelection.id = 5;
- mTestObject->mSelection.id = 0;
- mTestObject->mDescription = QString();
- mGroup->mApId = 0;
-
- mTestObject->mApplSettings->emitFinished(CmApplSettingsUi::ApplSettingsErrorCancel);
-
- QCOMPARE( mTestObject->mSelection.id, (uint)0 );
-
- // no error
- mTestObject->mDescription = QString();
- mTestObject->mCmManager->mConnectionMethods[5] = new CmConnectionMethodShim(5, 4, QString("5"));
-
- mTestObject->mApplSettings->emitFinished(CmApplSettingsUi::ApplSettingsErrorNone);
-
- QCOMPARE( mTestObject->mSelection.id, mTestObject->mApplSettings->mSelection.id );
- QCOMPARE( mGroup->mApId, (uint)4 );
- QCOMPARE( mTestObject->mDescription, QString("5") );
-
- // no error, but CmManagerShim throws at that id.
- mTestObject->mSelection.id = 0;
- mTestObject->mDescription = QString();
- mGroup->mApId = 0;
- CmManagerShim::mConnectionMethodThrowsAtId = 5;
-
- mTestObject->mApplSettings->emitFinished(CmApplSettingsUi::ApplSettingsErrorNone);
-
- QCOMPARE( mTestObject->mSelection.id, (uint)0 );
- QCOMPARE( mGroup->mApId, (uint)0 );
- QVERIFY( mTestObject->mDescription.isNull() );
-}
-
-// ---------------------------------------------------------------------------
-// main
-// ---------------------------------------------------------------------------
-//
-int main(int argc, char *argv[])
-{
- HbApplication app(argc, argv);
-
- TestVideoSettingsAccessPointEntry tc;
-
- char *pass[3];
- pass[0] = argv[0];
- pass[1] = "-o";
- pass[2] = "c:\\data\\testvideosettingsaccesspointentry.txt";
-
- return QTest::qExec(&tc, 3, pass);
-}
-
-// end of file
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/inc/cpitemdatahelper.h Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/inc/cpitemdatahelper.h Fri Oct 15 16:29:10 2010 +0300
@@ -15,8 +15,8 @@
*
*/
-#ifndef CP_ITEM_DATA_HELPER_H
-#define CP_ITEM_DATA_HELPER_H
+#ifndef CPITEMDATAHELPER_H
+#define CPITEMDATAHELPER_H
#include <QObject>
#include <qmap.h>
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/inc/cpsettingformentryitemdata.h Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/inc/cpsettingformentryitemdata.h Fri Oct 15 16:29:10 2010 +0300
@@ -18,6 +18,8 @@
#ifndef CPSETTINGFORMENTRYITEMDATA_H
#define CPSETTINGFORMENTRYITEMDATA_H
+#warning fake
+
#include <QObject>
#include <hbdataformmodelitem.h>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/inc/mpxvideo_debug.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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: Debug print macros*
+*/
+
+
+// Version : %version: 1 %
+
+#ifndef __MPXVIDEO_DEBUG_H__
+#define __MPXVIDEO_DEBUG_H__
+
+#include "stub/inc/cpitemdatahelper.h"
+#include "stub/inc/cpsettingformentryitemdata.h"
+#include "stub/inc/cmapplsettingsui.h"
+#include "stub/inc/cmconnectionmethod_shim.h"
+#include "stub/inc/cmmanager_shim.h"
+#include "stub/inc/videosettingsgroup.h"
+
+// INCLUDES
+#include <e32std.h>
+#include <e32svr.h>
+#include <e32des16.h>
+#include <e32property.h>
+#include <flogger.h>
+#include <e32def.h>
+
+
+
+// #define _MPX_FILE_LOGGING_
+
+#ifdef _DEBUG
+ #define FU_DEBUG RDebug::Print
+#else
+ #ifdef _MPX_FILE_LOGGING_
+ #define FU_DEBUG MPXDebug::FileLog
+ #else
+ #define FU_DEBUG
+ #endif
+#endif
+
+
+class MPXDebug
+{
+ public:
+ inline static void FileLog( TRefByValue<const TDesC16> aFmt, ... )
+ {
+ VA_LIST list;
+ VA_START(list,aFmt);
+ RFileLogger::WriteFormat( _L("Fusion"),
+ _L("fusion.log"),
+ EFileLoggingModeAppend,
+ aFmt,
+ list );
+ }
+};
+
+
+
+// MACROS
+#ifdef _DEBUG
+ #define MPX_DEBUG TFusionLog::FusionLog
+ #define MPX_ENTER_EXIT TEnterExitLog _s
+#else
+ #define MPX_DEBUG
+ #define MPX_ENTER_EXIT
+#endif
+
+
+class TFusionLog : public TDes16Overflow
+{
+ public:
+
+ inline static void FusionLog( TRefByValue<const TDesC16> aFmt, ... )
+ {
+ TBuf< 496 > buffer;
+
+ VA_LIST list;
+ VA_START( list, aFmt );
+ buffer.AppendFormatList( aFmt, list );
+ VA_END(list);
+
+ FU_DEBUG(_L("#Fu# %S"), &buffer );
+ }
+};
+
+class TEnterExitLog : public TDes16Overflow
+{
+ public:
+
+ void Overflow(TDes16& /*aDes*/)
+ {
+ FU_DEBUG(_L("%S Logging Overflow"), &iFunctionName);
+ }
+
+ TEnterExitLog( TRefByValue<const TDesC> aFunctionName,
+ TRefByValue<const TDesC> aFmt, ... )
+ {
+ iFunctionName = HBufC::New( TDesC(aFunctionName).Length() );
+
+ if ( iFunctionName )
+ {
+ iFunctionName->Des().Copy(aFunctionName);
+ }
+
+ TBuf< 496 > buffer;
+
+ VA_LIST list;
+ VA_START( list, aFmt );
+ buffer.AppendFormatList( aFmt, list, this );
+ VA_END(list);
+
+ FU_DEBUG(_L("#Fu# --> %S %S"), iFunctionName, &buffer );
+ }
+
+ TEnterExitLog( TRefByValue<const TDesC> aFunctionName )
+ {
+ iFunctionName = HBufC::New( TDesC(aFunctionName).Length() );
+
+ if ( iFunctionName )
+ {
+ iFunctionName->Des().Copy(aFunctionName);
+ }
+
+ FU_DEBUG(_L("#Fu# --> %S"), iFunctionName );
+ }
+
+ ~TEnterExitLog()
+ {
+ FU_DEBUG(_L("#Fu# <-- %S"), iFunctionName );
+ delete iFunctionName;
+ }
+
+ private:
+ HBufC* iFunctionName;
+};
+
+_LIT(_KMPXErrorInfo, "#Fu# MPXVideo Error : error %d file %s line %d");
+
+#define MPX_S(a) _S(a)
+
+#define MPX_ERROR_LOG(aErr) \
+ {\
+ if (aErr) \
+ FU_DEBUG(_KMPXErrorInfo, aErr, MPX_S(__FILE__), __LINE__);\
+ }
+
+#ifdef _DEBUG
+ #define MPX_TRAP(_r, _s) TRAP(_r,_s);MPX_ERROR_LOG(_r);
+ #define MPX_TRAPD(_r, _s) TRAPD(_r,_s);MPX_ERROR_LOG(_r);
+#else // _DEBUG
+ #define MPX_TRAP(_r, _s) TRAP(_r,_s);(_r=_r);
+ #define MPX_TRAPD(_r, _s) TRAPD(_r,_s);(_r=_r);
+#endif // _DEBUG
+
+#endif // __MPXVIDEO_DEBUG_H__
+
+// End of File
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cmapplsettingsui.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cmapplsettingsui.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -16,7 +16,8 @@
*/
// INCLUDE FILES
-#include "cmapplsettingsui.h"
+#include "stub/inc/cpsettingformentryitemdata.h"
+#include "stub/inc/cmapplsettingsui.h"
// ---------------------------------------------------------------------------
// CmApplSettingsUi
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cmconnectionmethod_shim.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cmconnectionmethod_shim.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -16,7 +16,7 @@
*/
// INCLUDE FILES
-#include "cmconnectionmethod_shim.h"
+#include "stub/inc/cmconnectionmethod_shim.h"
#include <qlist.h>
#include <qvariant.h>
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cmmanager_shim.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cmmanager_shim.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -16,8 +16,8 @@
*/
// INCLUDE FILES
-#include "cmmanager_shim.h"
-#include "cmconnectionmethod_shim.h"
+#include "stub/inc/cmmanager_shim.h"
+#include "stub/inc/cmconnectionmethod_shim.h"
#include <qlist.h>
int CmManagerShim::mDestructorCount = 0;
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cpitemdatahelper.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cpitemdatahelper.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -16,7 +16,7 @@
*/
// INCLUDE FILES
-#include "cpitemdatahelper.h"
+#include "stub/inc/cpitemdatahelper.h"
// ---------------------------------------------------------------------------
// CpItemDataHelper
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cpsettingformentryitemdata.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/cpsettingformentryitemdata.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -16,7 +16,7 @@
*/
// INCLUDE FILES
-#include "cpsettingformentryitemdata.h"
+#include "stub/inc/cpsettingformentryitemdata.h"
// ---------------------------------------------------------------------------
// CpSettingFormEntryItemData
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/videosettingsgroup.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/stub/src/videosettingsgroup.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -16,7 +16,7 @@
*/
#include "videosettingsgroup.h"
-#include <cpitemdatahelper.h>
+#include "stub/inc/cpitemdatahelper.h"
// ---------------------------------------------------------------------------
// Constructor
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/testaccesspointentry.pro Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,56 @@
+#
+# 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:
+#
+
+TARGET = testaccesspointentry
+TEMPLATE = app
+
+DEPENDPATH += . \
+ inc \
+ src
+
+INCLUDEPATH += inc \
+ stub/inc \
+ ../../inc \
+ ../../../../inc \
+
+CONFIG += qtestlib \
+ Hb \
+ symbian_test
+
+LIBS += -lcpframework \
+ -lxqutils.dll
+
+# Input
+HEADERS += inc/testaccesspointentry.h \
+ ../../inc/videosettingsaccesspointentry.h \
+ stub/inc/mpxvideo_debug.h \
+ stub/inc/videosettingsgroup.h \
+ stub/inc/cpitemdatahelper.h \
+ stub/inc/cpsettingformentryitemdata.h \
+ stub/inc/cmapplsettingsui.h \
+ stub/inc/cmmanager_shim.h \
+ stub/inc/cmconnectionmethod_shim.h \
+
+SOURCES += src/testaccesspointentry.cpp \
+ ../../src/videosettingsaccesspointentry.cpp \
+ stub/src/videosettingsgroup.cpp \
+ stub/src/cpitemdatahelper.cpp \
+ stub/src/cpsettingformentryitemdata.cpp \
+ stub/src/cmapplsettingsui.cpp \
+ stub/src/cmmanager_shim.cpp \
+ stub/src/cmconnectionmethod_shim.cpp \
+
+TARGET.CAPABILITY = All -Tcb
--- a/mediasettings/videosettingsplugin/tsrc/testaccesspointentry/testvideosettingsaccesspointentry.pro Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# 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:
-#
-
-TARGET = testvideosettingsaccesspointentry
-TEMPLATE = app
-
-DEPENDPATH += . \
- inc \
- src
-
-INCLUDEPATH += inc \
- stub/inc \
- ../../inc \
- ../../../../inc \
-
-CONFIG += qtestlib \
- Hb \
- symbian_test
-
-LIBS += -lcpframework \
- -lxqutils.dll
-
-# Input
-HEADERS += inc/testvideosettingsaccesspointentry.h \
- ../../inc/videosettingsaccesspointentry.h \
- stub/inc/videosettingsgroup.h \
- stub/inc/cpitemdatahelper.h \
- stub/inc/cpsettingformentryitemdata.h \
- stub/inc/cmapplsettingsui.h \
- stub/inc/cmmanager_shim.h \
- stub/inc/cmconnectionmethod_shim.h \
-
-SOURCES += src/testvideosettingsaccesspointentry.cpp \
- ../../src/videosettingsaccesspointentry.cpp \
- stub/src/videosettingsgroup.cpp \
- stub/src/cpitemdatahelper.cpp \
- stub/src/cpsettingformentryitemdata.cpp \
- stub/src/cmapplsettingsui.cpp \
- stub/src/cmmanager_shim.cpp \
- stub/src/cmconnectionmethod_shim.cpp \
-
-TARGET.CAPABILITY = All -Tcb
--- a/mediasettings/videosettingsplugin/tsrc/testgroup/testvideosettingsgroup.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testgroup/testvideosettingsgroup.pro Fri Oct 15 16:29:10 2010 +0300
@@ -69,3 +69,6 @@
stub/src/videosettingsaccesspointentry.cpp \
TARGET.CAPABILITY = All -Tcb
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/mediasettings/videosettingsplugin/tsrc/testplugin/testvideosettingsplugin.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/mediasettings/videosettingsplugin/tsrc/testplugin/testvideosettingsplugin.pro Fri Oct 15 16:29:10 2010 +0300
@@ -42,3 +42,6 @@
stub/src/videosettingsgroup.cpp \
TARGET.CAPABILITY = All -Tcb
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/group/VCXMyVideosCollectionPluginTest.mmp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/group/VCXMyVideosCollectionPluginTest.mmp Fri Oct 15 16:29:10 2010 +0300
@@ -72,7 +72,9 @@
LANG SC
+SMPSAFE
+
// DEFFILE ?filename
// AIF ?filename
-// End of File
+// End of File
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/apaidstub.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* 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 __APAID_H__
+#define __APAID_H__
+
+#include <e32base.h>
+#include <apadef.h>
+
+class TApaAppInfo
+ {
+public:
+ TApaAppInfo() { mConstructCount++; iFullName.Copy(_L("")); }
+public:
+ /** The full path name of the application DLL. */
+ TFileName iFullName;
+
+ static TInt mConstructCount;
+ };
+
+#endif
+
+// EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/apgclistub.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* 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 __APGCLI_H__
+#define __APGCLI_H__
+
+#include <e32base.h>
+#include "apaidstub.h"
+
+class RApaLsSession : public RSessionBase
+ {
+public:
+ RApaLsSession() {}
+
+ TInt GetAppInfo(TApaAppInfo& aInfo, TUid /*aAppUid*/) const
+ {
+ aInfo.iFullName = mFileName;
+ mGetAppInfoCallCount++;
+ return 0;
+ }
+
+ TInt Connect() { return 0; }
+ void Close() {}
+
+ static TFileName mFileName;
+ static TInt mGetAppInfoCallCount;
+ };
+
+#endif // __APGCLI_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/apgtaskstub.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* 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 __APGTASK_H__
+#define __APGTASK_H__
+
+#include "coemainstub.h"
+#include <e32base.h>
+
+class TApaTask
+{
+public:
+ TApaTask(RWsSession& /*aWsSession*/) {}
+
+ TBool Exists() const { return mExistsReturnValue; }
+ void BringToForeground() { mBringToForegroundCallcount++; }
+
+ static bool mExistsReturnValue;
+ static int mExistsCallCount;
+ static int mBringToForegroundCallcount;
+};
+
+class TApaTaskList
+{
+public:
+ TApaTaskList(RWsSession& /*aWsSession*/) {}
+ TApaTask FindApp(TUid /*aAppUid*/) { mFindAppCallCount++; return TApaTask(CCoeEnv::mSession); }
+
+ static int mFindAppCallCount;
+};
+
+#endif
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/coemainstub.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* 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 __COEMAIN_H__
+#define __COEMAIN_H__
+
+typedef int RWsSession;
+
+#include <e32base.h>
+
+class CCoeEnv;
+
+extern CCoeEnv *g_Env;
+
+class CCoeEnv
+{
+public:
+
+ static CCoeEnv* Static()
+ {
+ if(mStaticReturnsNull)
+ return 0;
+ if(!g_Env)
+ g_Env = new (ELeave) CCoeEnv;
+ return g_Env;
+ }
+
+ /**
+ * Must be called before test exits if it has called the static method.
+ */
+ static void Reset() { delete g_Env; g_Env = 0; }
+
+ RWsSession &WsSession() { return mSession; }
+
+ // Construction and destruction
+ CCoeEnv() { }
+ ~CCoeEnv() {}
+
+ static int mCCoeEnvCallCount;
+ static RWsSession mSession;
+ static bool mStaticReturnsNull;
+};
+
+#endif
+
+// End of file.
--- a/videocollection/tsrc/stubs/inc/hbdialog.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbdialog.h Fri Oct 15 16:29:10 2010 +0300
@@ -90,6 +90,11 @@
void setHeadingWidget(QGraphicsWidget *headingWidget);
/**
+ * sets mHeadingWidget;
+ */
+ void setHeadingText(const QString &heading);
+
+ /**
* sets mContentWidget
*/
void setContentWidget(QGraphicsWidget *contentWidget);
@@ -112,6 +117,11 @@
/**
* stubbed member
*/
+ QString mHeadingText;
+
+ /**
+ * stubbed member
+ */
QGraphicsWidget *mHeadingWidget;
/**
@@ -153,7 +163,7 @@
* actions other tham primary or secondary
*/
QList<HbAction*> mActions;
-
+
/**
* address of current instance zeroed during destcructor
* this is for making sure object is removed correctly
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/hbselectiondialog.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* 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: stub HbSelectionDialog
+*
+*/
+
+#ifndef HBSELECTIONDIALOG_H
+#define HBSELECTIONDIALOG_H
+
+#include <QObject>
+#include "hbwidget.h"
+#include "hbdialog.h"
+#include "hbselectiondialog.h"
+#include "hbabstractitemview.h"
+
+class HbListView;
+class QGraphicsItem;
+class QGraphicsWidget;
+class HbAction;
+class QAbstractItemModel;
+
+
+class HbSelectionDialog : public HbDialog
+{
+ Q_OBJECT
+
+signals:
+
+ void selectionChanged();
+
+public:
+
+
+ /**
+ * contructor
+ */
+ HbSelectionDialog(QGraphicsItem *parent=0);
+
+ /**
+ * destructor
+ */
+ ~HbSelectionDialog();
+
+public:
+
+ void setSelectionMode(HbAbstractItemView::SelectionMode mode);
+ HbAbstractItemView::SelectionMode selectionMode() const;
+
+ void setModel(QAbstractItemModel* model);
+ QAbstractItemModel* model() const;
+ QModelIndexList selectedModelIndexes() const;
+ void setSelectedModelIndexes(QModelIndexList list);
+ QString selectionTitle() const;
+ void setSelectionTitle(const QString& title);
+ void setListView(HbListView* list);
+ virtual QGraphicsItem *primitive(const QString &itemName) const;
+
+ HbAbstractItemView::SelectionMode mSelectionMode;
+ QAbstractItemModel* mModel;
+ QModelIndexList mModelIndexList;
+ HbListView* mListView;
+
+ /**
+ * address of current instance zeroed during destcructor
+ * this is for making sure object is removed correctly
+ */
+ static HbSelectionDialog *currentInstance;
+
+ /**
+ * if true, exec returns mPrimaryAction
+ */
+ static bool execReturnPrimary;
+
+ /**
+ * if true, primaryAction() -method returns null
+ */
+ static bool primaryReturnNull;
+
+ /**
+ * if true, secondaryAction() -method returns null
+ */
+ static bool secondaryReturnNull;
+
+ /**
+ * the amount how many times the open has been called.
+ */
+ static int openAmount;
+
+};
+
+#endif
--- a/videocollection/tsrc/stubs/inc/hbview.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbview.h Fri Oct 15 16:29:10 2010 +0300
@@ -67,6 +67,24 @@
mNavigationAction = action;
}
+ HbMenu* menu() const
+ {
+ return mMenu;
+ }
+
+ void setMenu(HbMenu *menu)
+ {
+ mMenu = menu;
+ }
+
+ HbMenu* takeMenu()
+ {
+ HbMenu* tmp = mMenu;
+ mMenu = 0;
+ return tmp;
+ }
+
+ HbMenu* mMenu;
HbAction *mNavigationAction;
--- a/videocollection/tsrc/stubs/inc/hbwidget.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbwidget.h Fri Oct 15 16:29:10 2010 +0300
@@ -30,8 +30,10 @@
HbWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){initializeCount++;}
virtual ~HbWidget(){initializeCount--;}
-
- void clearActions()
+
+ virtual QGraphicsItem *primitive(const QString &itemName) const;
+
+ void clearActions()
{
// Note actions().clear() does not work as actions() returns a copy of the actions list.
QList<QAction*> act = actions();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/videocollectiontrace.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,940 @@
+/*
+* 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: tracing functionality for video collection
+*
+*/
+
+#ifndef VIDEOCOLLETIONTRACE_H
+#define VIDEOCOLLETIONTRACE_H
+
+#include "xqaiwrequeststub.h"
+#include "xqappmgrstub.h"
+#include "apaidstub.h"
+#include "apgclistub.h"
+#include "coemainstub.h"
+#include "apgtaskstub.h"
+
+/**
+ * Set 1 to enable tracing in urel builds. Default is 0.
+ */
+#define UREL_TRACE 0
+
+/**
+ * Set to 1 to disable tracing. Default is 0.
+ */
+#define DISABLE_TRACE 0
+
+/**
+ * 0 = Tracing into RDebug in all builds. (Default)
+ * 1 = Tracing into RDebug in winscw, file in ARM.
+ * 2 = Tracing into file in all builds.
+ */
+#define TRACE_OUTPUT 0
+
+//-----------------------------------------------------------------------------
+// Trace configuration
+//-----------------------------------------------------------------------------
+//
+#if ( (defined(_DEBUG) || UREL_TRACE == 1) && DISABLE_TRACE == 0 )
+
+ // Error trace
+ #define ERROR_TRACE
+
+ // Function trace
+ #define FUNC_TRACE
+
+ // Info trace
+ #define INFO_TRACE
+
+ // Timestamp trace
+ #define TIMESTAMP_TRACE
+
+ // Tracing current client process and thread
+ #define CLIENT_TRACE
+
+ // Enable tracing into file.
+ #if ((TRACE_OUTPUT == 1 && !defined(__WINSCW__)) || TRACE_OUTPUT == 2)
+ #define TRACE_INTO_FILE
+ #endif
+
+#else // TRACING DISABLED
+
+ #undef ERROR_TRACE
+ #undef INFO_TRACE
+ #undef TIMESTAMP_TRACE
+ #undef FUNC_TRACE
+ #undef CLIENT_TRACE
+ #undef TRACE_INTO_FILE
+
+#endif // TRACING ENABLED
+
+//-----------------------------------------------------------------------------
+// INCLUDES
+//-----------------------------------------------------------------------------
+//
+#include <qstring.h>
+#include <e32debug.h> // RDebug
+
+#if defined TRACE_INTO_FILE
+ #include <flogger.h> // RFileLogger
+#endif
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+//
+/**
+* Trace prefixes for macros with component name.
+*/
+#define _PREFIX_TRACE( a ) TPtrC( (const TText*) L"#Fu#Co# " L##a )
+#define _PREFIX_TRACE_2( a, b ) TPtrC( (const TText*) L"#Fu#Co# " L##a L##b )
+#define _PREFIX_TRACE8( a ) (const char*)( "#Fu#Co# " a )
+
+/**
+* Prefix error trace
+*/
+#define _PREFIX_ERROR( aMsg ) _PREFIX_TRACE( "[ERROR: %d]: " L##aMsg )
+
+/**
+* Define needed if TRACE_INTO_FILE macro in use
+*/
+#ifdef TRACE_INTO_FILE
+ _LIT( KTracePath, "Fusion" );
+ _LIT( KTraceFile, "videos.log" );
+#endif
+
+//-----------------------------------------------------------------------------
+// Error trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef ERROR_TRACE
+
+ /**
+ * Error trace definitions.
+ */
+ #ifdef TRACE_INTO_FILE
+
+ #define ERROR( aErr, aMsg )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_ERROR( aMsg ), aErr );\
+ }\
+ }
+ #define ERROR_1( aErr, aMsg, aP1 )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_ERROR( aMsg ), aErr, aP1 );\
+ }\
+ }
+ #define ERROR_2( aErr, aMsg, aP1, aP2 )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
+ }\
+ }
+ #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
+ }\
+ }
+
+ #else//TRACE_INTO_FILE not defined
+
+ #define ERROR( aErr, aMsg )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RDebug::Print( _PREFIX_ERROR( aMsg ), aErr );\
+ }\
+ }
+ #define ERROR_1( aErr, aMsg, aP1 )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1 );\
+ }\
+ }
+ #define ERROR_2( aErr, aMsg, aP1, aP2 )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
+ }\
+ }
+ #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
+ {\
+ if( aErr < KErrNone )\
+ {\
+ RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
+ }\
+ }
+
+ #endif//TRACE_INTO_FILE
+
+ #define ERROR_GEN( aMsg ) ERROR( KErrGeneral, aMsg )
+ #define ERROR_GEN_1( aMsg, aP1 ) ERROR_1( KErrGeneral, aMsg, aP1 )
+ #define ERROR_GEN_2( aMsg, aP1, aP2 ) ERROR_2( KErrGeneral, aMsg, aP1, aP2 )
+ #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) ERROR_3( KErrGeneral, aMsg, aP1, aP3 )
+
+ #define ERROR_PARAM(_p) _p
+
+ #define TRAPD_ERR( aErr, aStmt ) TRAPD( aErr, aStmt )
+ #define TRAP_ERR( aErr, aStmt ) TRAP( aErr, aStmt )
+
+ #define TRAP_AND_LEAVE(_s,_t) \
+ { TRAPD(_e,_s); ERROR(_e,_t); User::LeaveIfError(_e); }
+
+#else//ERROR_TRACE not defined
+
+ #define ERROR( aErr, aMsg )
+ #define ERROR_1( aErr, aMsg, aP1 )
+ #define ERROR_2( aErr, aMsg, aP1, aP2 )
+ #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )
+ #define ERROR_GEN( aMsg )
+ #define ERROR_GEN_1( aMsg, aP1 )
+ #define ERROR_GEN_2( aMsg, aP1, aP2 )
+ #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 )
+
+ #define ERROR_PARAM(_p)
+
+ #define TRAPD_ERR( aErr, aStmt ) TRAP_IGNORE( aStmt )
+ #define TRAP_ERR( aErr, aStmt ) TRAP_IGNORE( aStmt )
+
+ #define TRAP_AND_LEAVE(_s,_t) { _s; }
+
+#endif//ERROR_TRACE
+
+//-----------------------------------------------------------------------------
+// Info trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef INFO_TRACE
+
+ /**
+ * Info log message definitions.
+ */
+ #ifdef TRACE_INTO_FILE
+
+ #define INFO( aMsg )\
+ {\
+ RFileLogger::Write( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ) );\
+ }
+ #define INFO_1( aMsg, aP1 )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ), aP1 );\
+ }
+ #define INFO_2( aMsg, aP1, aP2 )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ), aP1, aP2 );\
+ }
+ #define INFO_3( aMsg, aP1, aP2, aP3 )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ), aP1, aP2, aP3 );\
+ }
+ #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ), aP1, aP2, aP3, aP4 );\
+ }
+ #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
+ }
+ #define INFOQSTR_1( aMsg, aQStr )\
+ {\
+ TPtrC _qstringptrc(aQStr.utf16()); \
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ), &_qstringptrc );\
+ }
+ #define INFOQSTR_2( aMsg, aQStr1, aQStr2 )\
+ {\
+ TPtrC _qstringptrc1(aQStr1.utf16()); \
+ TPtrC _qstringptrc2(aQStr2.utf16()); \
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ _PREFIX_TRACE( aMsg ), &_qstringptrc1, &_qstringptrc2 );\
+ }
+
+ #else//TRACE_INTO_FILE not defined
+
+ #define INFO( aMsg )\
+ {\
+ RDebug::Print( _PREFIX_TRACE( aMsg ) );\
+ }
+ #define INFO_1( aMsg, aP1 )\
+ {\
+ RDebug::Print( _PREFIX_TRACE( aMsg ), aP1 );\
+ }
+ #define INFO_2( aMsg, aP1, aP2 )\
+ {\
+ RDebug::Print( _PREFIX_TRACE( aMsg ), aP1, aP2 );\
+ }
+ #define INFO_3( aMsg, aP1, aP2, aP3 )\
+ {\
+ RDebug::Print( _PREFIX_TRACE( aMsg ), aP1, aP2, aP3 );\
+ }
+ #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
+ {\
+ RDebug::Print( _PREFIX_TRACE( aMsg ), aP1, aP2, aP3, aP4 );\
+ }
+ #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
+ {\
+ RDebug::Print( _PREFIX_TRACE( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
+ }
+
+ #define INFOQSTR_1( aMsg, aQStr )\
+ {\
+ TPtrC _qstringptrc(aQStr.utf16()); \
+ RDebug::Print( _PREFIX_TRACE( aMsg ), &_qstringptrc );\
+ }
+
+ #define INFOQSTR_2( aMsg, aQStr1, aQStr2 )\
+ {\
+ TPtrC _qstringptrc1(aQStr1.utf16()); \
+ TPtrC _qstringptrc2(aQStr2.utf16()); \
+ RDebug::Print( _PREFIX_TRACE( aMsg ), &_qstringptrc1, &_qstringptrc2 );\
+ }
+
+ #endif//TRACE_INTO_FILE
+
+ #define INFO_PARAM( aParam ) aParam
+
+#else//INFO_TRACE not defined
+
+ #define INFO( aMsg )
+ #define INFO_1( aMsg, aP1 )
+ #define INFO_2( aMsg, aP1, aP2 )
+ #define INFO_3( aMsg, aP1, aP2, aP3 )
+ #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )
+ #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
+ #define INFO_PARAM( aParam )
+ #define INFOQSTR_1( aMsg, aP1 );
+ #define INFOQSTR_2( aMsg, aP1, aP2 );
+
+#endif//INFO_TRACE
+
+//-----------------------------------------------------------------------------
+// Trace current client thread name and process id
+//-----------------------------------------------------------------------------
+//
+#ifdef CLIENT_TRACE
+
+ #define _PREFIX_CLIENT( aMsg ) _PREFIX_TRACE( "[CLIENT: sid [0x%x] thread [%S]] " L##aMsg )
+
+ #ifdef TRACE_INTO_FILE
+
+ #define CLIENT_TRACE_2( aMsg, aP1, aP2 )\
+ {\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, _PREFIX_CLIENT(aMsg), aP1, aP2 );\
+ }
+
+ #else//TRACE_INTO_FILE not defined
+
+ #define CLIENT_TRACE_2( aMsg, aP1, aP2 )\
+ {\
+ RDebug::Print( _PREFIX_CLIENT(aMsg), aP1, aP2 );\
+ }
+
+ #endif//TRACE_INTO_FILE
+
+ /**
+ * Traces current secure id and thread
+ */
+ #define CURRENT_CLIENT( aMsg )\
+ {\
+ TName name( RThread().Name() );\
+ TSecureId sid( RThread().SecureId() );\
+ CLIENT_TRACE_2( aMsg, sid.iId, &name );\
+ }
+
+ /**
+ * Traces secure id and thread from RMessage2
+ */
+ #define CLIENT( aRMessage2 )\
+ {\
+ RThread thread;\
+ TInt err = aRMessage2.Client( thread );\
+ if( err == KErrNone )\
+ {\
+ TName name( thread.Name() );\
+ TSecureId sid( thread.SecureId() );\
+ CLIENT_TRACE_2( "", sid.iId, &name );\
+ }\
+ thread.Close();\
+ }
+
+ /**
+ * Traces secure id and thread from RMessage2
+ */
+ #define CLIENT_1( aRMessage2, aMsg )\
+ {\
+ RThread thread;\
+ TInt err = aRMessage2.Client( thread );\
+ if( err == KErrNone )\
+ {\
+ TName name( thread.Name() );\
+ TSecureId sid( thread.SecureId() );\
+ CLIENT_TRACE_2( aMsg, sid.iId, &name );\
+ }\
+ thread.Close();\
+ }
+
+#else
+
+ #define CURRENT_CLIENT( aMsg )
+ #define CLIENT( aRMessage2 )
+ #define CLIENT_1( aRMessage2, aMsg )
+
+#endif
+
+//-----------------------------------------------------------------------------
+// Trace current heap usage
+//-----------------------------------------------------------------------------
+//
+#ifdef HEAP_TRACE
+
+ #define _PREFIX_HEAP( aMsg ) _PREFIX_TRACE( "[HEAP: %d bytes] " L##aMsg )
+
+ #ifdef TRACE_INTO_FILE
+
+ #define HEAP( aMsg )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace );\
+ }
+ #define HEAP_1( aMsg, aP1 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
+ }
+ #define HEAP_2( aMsg, aP1, aP2 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
+ }
+ #define HEAP_3( aMsg, aP1, aP2, aP3 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
+ }
+ #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
+ }
+
+ #else//TRACE_INTO_FILE not defined
+
+ #define HEAP( aMsg )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace );\
+ }
+ #define HEAP_1( aMsg, aP1 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
+ }
+ #define HEAP_2( aMsg, aP1, aP2 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
+ }
+ #define HEAP_3( aMsg, aP1, aP2, aP3 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
+ }
+ #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
+ {\
+ TInt totalAllocSpace = 0;\
+ User::AllocSize( totalAllocSpace );\
+ RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
+ }
+
+ #endif//TRACE_INTO_FILE
+
+#else//HEAP_TRACE not defined
+
+ #define HEAP( aMsg )
+ #define HEAP_1( aMsg, aP1 )
+ #define HEAP_2( aMsg, aP1, aP2 )
+ #define HEAP_3( aMsg, aP1, aP2, aP3 )
+ #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )
+
+#endif//HEAP_TRACE
+
+
+//-----------------------------------------------------------------------------
+// Function trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef FUNC_TRACE
+
+ #include <e32base.h> // TCleanupItem
+
+ /**
+ * Function logging definitions.
+ */
+ #ifdef TRACE_INTO_FILE
+
+ #define FUNC( aMsg, aP1 )\
+ {\
+ TPtrC8 trace( _S8( aMsg ) );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, trace, aP1 );\
+ }
+
+ #define FUNC2( aMsg, aP1, aP2 )\
+ {\
+ TPtrC8 trace( _S8( aMsg ) );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, trace, aP1, aP2 );\
+ }
+
+ #define FUNC_2( aMsg, aP1, aP2, aP3 )\
+ {\
+ TPtrC8 trace( _S8( aMsg ) );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, trace, aP1, aP2, aP3 );\
+ }
+
+ #else//TRACE_INTO_FILE not defined
+
+ #define FUNC( aMsg, aP1 )\
+ {\
+ RDebug::Printf( aMsg, aP1 );\
+ }
+
+ #define FUNC2( aMsg, aP1, aP2 )\
+ {\
+ RDebug::Printf( aMsg, aP1, aP2 );\
+ }
+
+ #define FUNC_2( aMsg, aP1, aP2, aP3 )\
+ {\
+ RDebug::Printf( aMsg, aP1, aP2, aP3 );\
+ }
+
+ #endif//TRACE_INTO_FILE
+
+ /**
+ * Function trace helper class.
+ */
+ const TText KFuncNameTerminator = '(';
+ const TText KFuncLeaveIndicator = 'L';
+ const TInt KFuncCanLeave = 0x1;
+ const TInt KFuncLeft = 0x2;
+ const TInt KFuncLogClient = 0x4;
+
+ class TFuncLog
+ {
+ public:
+ static void Cleanup( TAny* aPtr )
+ {
+ TFuncLog* self = static_cast< TFuncLog* >( aPtr );
+ self->iFlags |= KFuncLeft;
+ self->LogLeave();
+ }
+
+ inline void LogStart()
+ {
+ if ( iFlags & KFuncLogClient )
+ {
+ TBuf8<KMaxName> name8;
+ name8.Copy( RThread().Name() );
+ TSecureId sid( RThread().SecureId() );
+ FUNC_2( _PREFIX_TRACE8("%S() -> ENTER(sid [0x%x] thread [%S])"),
+ &iFunc, sid.iId, &name8 );
+ }
+ else
+ {
+ if(!iAddr)
+ {
+ FUNC( _PREFIX_TRACE8("%S() -> ENTER"), &iFunc );
+ }
+ else
+ {
+ FUNC2( _PREFIX_TRACE8("%S() [0x%x] -> ENTER"), &iFunc, iAddr );
+ }
+ }
+ }
+
+ inline void LogLeave()
+ {
+ if ( iFlags & KFuncLogClient )
+ {
+ TBuf8<KMaxName> name8;
+ name8.Copy( RThread().Name() );
+ TSecureId sid( RThread().SecureId() );
+ FUNC_2( _PREFIX_TRACE8("%S() - LEAVE(sid [0x%x] thread [%S])"),
+ &iFunc, sid.iId, &name8 );
+ }
+ else
+ {
+ if(!iAddr)
+ {
+ FUNC( _PREFIX_TRACE8("%S() - LEAVE"), &iFunc );
+ }
+ else
+ {
+ FUNC2( _PREFIX_TRACE8("%S() [0x%x] - LEAVE"), &iFunc, iAddr );
+ }
+ }
+ }
+
+ inline void LogEnd()
+ {
+ if ( iFlags & KFuncLogClient )
+ {
+ TBuf8<KMaxName> name8;
+ name8.Copy( RThread().Name() );
+ TSecureId sid( RThread().SecureId() );
+ FUNC_2( _PREFIX_TRACE8("%S() <- OUT(sid [0x%x] thread [%S])"),
+ &iFunc, sid.iId, &name8 );
+ }
+ else
+ {
+ if(!iAddr)
+ {
+ FUNC( _PREFIX_TRACE8("%S() <- OUT"), &iFunc );
+ }
+ else
+ {
+ FUNC2( _PREFIX_TRACE8("%S() [0x%x] <- OUT"), &iFunc, iAddr );
+ }
+ }
+ }
+
+ // For non leaving and L methods
+ inline TFuncLog( const char* aFunc, TUint aFlags ) :
+ iAddr(0), iFunc( aFunc ? _S8( aFunc ) : _S8("") ),
+ iFlags( aFlags ),
+ iCleanupItem( Cleanup, this ),
+ iLCPtr( NULL )
+ {
+ TInt pos( iFunc.Locate( KFuncNameTerminator ) );
+ if( pos >= 0 && pos < iFunc.Length() )
+ {
+ iFunc.Set( iFunc.Left( pos ) );
+ TInt len( iFunc.Length() );
+ if( len > 0 && iFunc[ len - 1 ] == KFuncLeaveIndicator )
+ {
+ iFlags |= KFuncCanLeave;
+ CleanupStack::PushL( iCleanupItem ); // Ignore warnings
+ }
+ }
+ LogStart();
+ }
+
+ // For non leaving and L methods
+ inline TFuncLog( TUint aAddr, const char* aFunc, TUint aFlags ) :
+ iAddr(aAddr), iFunc( aFunc ? _S8( aFunc ) : _S8("") ),
+ iFlags( aFlags ),
+ iCleanupItem( Cleanup, this ),
+ iLCPtr( NULL )
+ {
+ TInt pos( iFunc.Locate( KFuncNameTerminator ) );
+ if( pos >= 0 && pos < iFunc.Length() )
+ {
+ iFunc.Set( iFunc.Left( pos ) );
+ TInt len( iFunc.Length() );
+ if( len > 0 && iFunc[ len - 1 ] == KFuncLeaveIndicator )
+ {
+ iFlags |= KFuncCanLeave;
+ CleanupStack::PushL( iCleanupItem ); // Ignore warnings
+ }
+ }
+ LogStart();
+ }
+
+ // For LC methods only
+ inline TFuncLog( const char* aFunc, TUint aFlags, TAny** aLCPtr ) :
+ iAddr(0), iFunc( aFunc ? _S8( aFunc ) : _S8("") ),
+ iFlags( aFlags ),
+ iCleanupItem( Cleanup, this ),
+ iLCPtr( NULL )
+ {
+ TInt pos( iFunc.Locate( KFuncNameTerminator ) );
+ if( pos >= 0 && pos < iFunc.Length() )
+ {
+ iFunc.Set( iFunc.Left( pos ) );
+ iFlags |= KFuncCanLeave;
+ iLCPtr = aLCPtr;
+ CleanupStack::PushL( iCleanupItem ); // Ignore warnings
+ }
+ LogStart();
+ }
+
+ inline ~TFuncLog()
+ {
+ if ( !( iFlags & KFuncLeft ) )
+ {
+ if ( iFlags & KFuncCanLeave )
+ {
+ if ( iLCPtr && *iLCPtr)
+ {
+ CleanupStack::Pop(); // Pop LC ptr first
+ CleanupStack::Pop( this ); // Pop the cleanup item
+ CleanupStack::PushL( *iLCPtr ); // Push LC ptr back
+ }
+ else
+ {
+ CleanupStack::Pop( this ); // Pop the cleanup item
+ }
+ }
+ LogEnd(); // Normally finished
+ }
+ }
+
+ private: // Data
+ TPtrC8 iFunc;
+ TUint iFlags;
+ TCleanupItem iCleanupItem;
+ TAny** iLCPtr;
+ TUint iAddr;
+ };
+
+ /*
+ * Use with non leaving and L methods
+ *
+ * CMyClass* CMyClass::DoL()
+ * {
+ * FUNC_LOG;
+ * CMyClass* ret = new (ELeave) CMyClass();
+ * ...
+ * return ret;
+ * }
+ *
+ * CMyClass* CMyClass::Do()
+ * {
+ * FUNC_LOG;
+ * return iMyClass;
+ * }
+ *
+ */
+ #define FUNC_LOG TFuncLog _fl( __PRETTY_FUNCTION__, 0 );
+
+ /**
+ * Use this to log memory address.
+ */
+ #define FUNC_LOG_ADDR(P1) TFuncLog _fl2( (int)P1, __PRETTY_FUNCTION__, 0 );
+
+ /*
+ * Use with LC methods
+ *
+ * CMyClass* CMyClass::DoLC()
+ * {
+ * CMyClass* ret = NULL;
+ * FUNC_LOG_LC( ret );
+ * ...
+ * return ret;
+ * }
+ */
+ #define FUNC_LOG_LC( aPtr ) TFuncLog _fl( __PRETTY_FUNCTION__, 0, (TAny**)&aPtr );
+
+#ifdef CLIENT_TRACE
+
+ /*
+ * Used like FUNC_LOG. Prints client info useful for client side executed API methods.
+ */
+ #define FUNC_LOG_WITH_CLIENT TFuncLog _fl( __PRETTY_FUNCTION__, KFuncLogClient );
+
+ /*
+ * Used like FUNC_LOG_LC. Prints client info useful for client side executed API methods.
+ */
+ #define FUNC_LOG_WITH_CLIENT_LC( aPtr )\
+ TFuncLog _fl( __PRETTY_FUNCTION__, KFuncLogClient, (TAny**)&aPtr );
+
+#else //CLIENT_TRACE not defined
+
+ #define FUNC_LOG_WITH_CLIENT FUNC_LOG
+ #define FUNC_LOG_WITH_CLIENT_LC( aPtr ) FUNC_LOG_LC( aPtr )
+
+#endif //CLIENT_TRACE
+
+#else//FUNC_TRACE not defined
+
+ #define FUNC_LOG
+ #define FUNC_LOG_ADDR(P1)
+ #define FUNC_LOG_LC( ptr )
+ #define FUNC_LOG_WITH_CLIENT
+ #define FUNC_LOG_WITH_CLIENT_LC( ptr )
+
+#endif//FUNC_TRACE
+
+//-----------------------------------------------------------------------------
+// Timestamp trace macros
+//-----------------------------------------------------------------------------
+//
+#ifdef TIMESTAMP_TRACE
+
+ #define PREFIX_TIMESTAMP( aCaption )\
+ _PREFIX_TRACE_2("[TIMESTAMP] (%d:%02d:%02d.%06d us) ",aCaption)
+ #define CURRENT_TIME( aDt ) TDateTime aDt; { TTime t; t.HomeTime(); aDt = t.DateTime(); }
+ #define EXTRACT_TIME( aDt ) aDt.Hour(), aDt.Minute(), aDt.Second(), aDt.MicroSecond()
+
+ #ifdef TRACE_INTO_FILE
+
+ #define TIMESTAMP( aCaption )\
+ {\
+ CURRENT_TIME( dt );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ) );\
+ }
+
+ #define TIMESTAMP_1( aCaption, aP1 )\
+ {\
+ CURRENT_TIME( dt );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ),aP1 );\
+ }
+
+ #define TIMESTAMP_2( aCaption, aP1, aP2 )\
+ {\
+ CURRENT_TIME( dt );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ),aP1,aP2 );\
+ }
+
+ #define TIMESTAMP_3( aCaption, aP1, aP2, aP3 )\
+ {\
+ CURRENT_TIME( dt );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend,\
+ PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ),aP1,aP2,aP3 );\
+ }
+
+ #else//TRACE_INTO_FILE not defined
+
+ #define TIMESTAMP( aCaption )\
+ {\
+ CURRENT_TIME( dt );\
+ RDebug::Print( PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ) );\
+ }
+
+ #define TIMESTAMP_1( aCaption, aP1 )\
+ {\
+ CURRENT_TIME( dt );\
+ RDebug::Print( PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ),aP1 );\
+ }
+
+ #define TIMESTAMP_2( aCaption, aP1, aP2 )\
+ {\
+ CURRENT_TIME( dt );\
+ RDebug::Print( PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ),aP1,aP2 );\
+ }
+
+ #define TIMESTAMP_3( aCaption, aP1, aP2, aP3 )\
+ {\
+ CURRENT_TIME( dt );\
+ RDebug::Print( PREFIX_TIMESTAMP(aCaption),EXTRACT_TIME( dt ),aP1,aP2,aP3 );\
+ }
+
+ #endif//TRACE_INTO_FILE
+
+#else//TIMESTAMP_TRACE not defined
+
+ #define TIMESTAMP( aCaption )
+ #define TIMESTAMP_1( aCaption, aP1 )
+ #define TIMESTAMP_2( aCaption, aP1, aP2 )
+ #define TIMESTAMP_3( aCaption, aP1, aP2, aP3 )
+
+#endif//TIMESTAMP_TRACE
+
+//-----------------------------------------------------------------------------
+// Trace assert macros
+//-----------------------------------------------------------------------------
+//
+#if ( (defined(_DEBUG) || UREL_TRACE == 1) && DISABLE_TRACE == 0 )
+
+ #ifdef TRACE_INTO_FILE
+
+ #define PANIC_TRACE_2( aMsg, aP1, aP2 )\
+ {\
+ TPtrC8 trace( _S8( aMsg ) );\
+ RFileLogger::WriteFormat( KTracePath, KTraceFile,\
+ EFileLoggingModeAppend, trace, aP1, aP2 );\
+ }
+
+ #else//TRACE_INTO_FILE not defined
+
+ #define PANIC_TRACE_2( aMsg, aP1, aP2 )\
+ {\
+ RDebug::Printf( aMsg, aP1, aP2 );\
+ }
+
+ #endif //TRACE_INTO_FILE not define
+
+ static void Panic( const TDesC8& aFileName, const TInt aLineNum )
+ {
+ PANIC_TRACE_2( "Assertion failed in file=%S, line=%d", &aFileName, aLineNum );
+ User::Invariant();
+ }
+
+ #define ASSERT_ALWAYS_TRACE Panic( _L8(__FILE__), __LINE__ );
+ #define ASSERT_TRACE( _s ) if ( !( _s ) ) { ASSERT_ALWAYS_TRACE; }
+
+#else // TRACING DISABLED
+
+ #define ASSERT_ALWAYS_TRACE
+ #define ASSERT_TRACE( _s )
+
+#endif // TRACING ENABLED
+
+
+#endif // VIDEOCOLLETIONTRACE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/xqaiwrequeststub.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* 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 XQAIWREQUEST_H_
+#define XQAIWREQUEST_H_
+
+#include <QObject>
+
+class XQAiwRequest : public QObject
+ {
+ Q_OBJECT
+
+public:
+
+ XQAiwRequest();
+ virtual ~XQAiwRequest();
+
+ static void reset()
+ {
+ mSetArgumentsCallCount = 0;
+ mLastErrorReturnValue = 0;
+ mLastErrorCallCount = 0;
+ mSendCallCount = 0;
+ mSendFails = false;
+ mSetEmbeddedCallCount = 0;
+ }
+
+public:
+
+ void setArguments(const QList<QVariant> &arguments);
+ int lastError() const;
+ bool send();
+ void setEmbedded(bool embedded);
+
+public:
+
+ static int mSetArgumentsCallCount;
+ static int mLastErrorReturnValue;
+ static int mLastErrorCallCount;
+ static int mSendCallCount;
+ static bool mSendFails;
+ static int mSetEmbeddedCallCount;
+
+ };
+
+#endif /* XQAIWREQUEST_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/xqappmgrstub.h Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* 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 XQAPPLICATIONMANAGER_H
+#define XQAPPLICATIONMANAGER_H
+
+#include <QObject>
+#include <QUrl>
+#include "xqaiwrequeststub.h"
+
+class XQApplicationManager : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ XQApplicationManager() {}
+ virtual ~XQApplicationManager() {}
+
+public:
+
+ static void reset()
+ {
+ mCreateFails = 0;
+ mCreateCallCount = 0;
+ }
+
+ XQAiwRequest* create( QUrl url );
+
+public:
+
+ static bool mCreateFails;
+ static int mCreateCallCount;
+
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/apaidstub.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,22 @@
+/*
+* 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 "apaidstub.h"
+
+TInt TApaAppInfo::mConstructCount = 0;
+
+// EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/apgclistub.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* 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 "apgclistub.h"
+
+TFileName RApaLsSession::mFileName = TFileName();
+TInt RApaLsSession::mGetAppInfoCallCount = 0;
+
+// EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/apgtask.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* 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 "apgtaskstub.h"
+
+bool TApaTask::mExistsReturnValue = true;
+int TApaTask::mExistsCallCount = 0;
+int TApaTask::mBringToForegroundCallcount = 0;
+int TApaTaskList::mFindAppCallCount = 0;
+
+// End of file.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/coemain.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* 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 "coemainstub.h"
+
+int CCoeEnv::mCCoeEnvCallCount = 0;
+bool CCoeEnv::mStaticReturnsNull = false;
+RWsSession CCoeEnv::mSession = 0;
+
+CCoeEnv *g_Env;
+
+// End of file.
--- a/videocollection/tsrc/stubs/src/hbdialog.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/src/hbdialog.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -28,6 +28,7 @@
HbDialog::HbDialog(QGraphicsItem *parent) :
HbPopup(parent),
+mHeadingText(""),
mHeadingWidget(0),
mContentWidget(0),
mTimeout(NoTimeout),
@@ -95,6 +96,13 @@
mHeadingWidget = headingWidget;
}
+void HbDialog::setHeadingText(const QString &heading)
+{
+ QString text;
+ mHeadingText.clear();
+ mHeadingText.append(heading);
+}
+
void HbDialog::setContentWidget(QGraphicsWidget *contentWidget)
{
mContentWidget = contentWidget;
--- a/videocollection/tsrc/stubs/src/hbdocumentloader.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/src/hbdocumentloader.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -270,35 +270,11 @@
}
else if(name == DOCML_VIDEOSELECTIONDIALOG_FILE)
{
- obj = new VideoListSelectionDialog(0, 0);
+ obj = new VideoListSelectionDialog(0);
}
else if(name == DOCML_NAME_DIALOG)
{
- obj = new VideoListSelectionDialog(0, 0);
- }
- else if(name == DOCML_NAME_DLG_HEADINGLBL)
- {
- obj = new HbLabel();
- }
- else if(name == DOCML_NAME_CHECK_CONTAINER)
- {
- obj = new HbWidget();
- }
- else if(name == DOCML_NAME_MARKALL)
- {
- obj = new HbCheckBox();
- }
- else if(name == DOCML_NAME_LBL_SELECTION)
- {
- obj = new HbLabel();
- }
- else if(name == DOCML_NAME_LIST_CONTAINER)
- {
- obj = new HbStackedWidget();
- }
- else if(name == DOCML_NAME_LBL_MARKALL)
- {
- obj = new HbLabel();
+ obj = new VideoListSelectionDialog(0);
}
return obj;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/hbselectiondialog.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* 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: stub HbSelectionDialog
+*
+*/
+#include <QGraphicsWidget>
+
+#include "hbaction.h"
+#include "hblabel.h"
+#include "hbselectiondialog.h"
+#include "hbabstractitemview.h"
+
+HbSelectionDialog *HbSelectionDialog::currentInstance = 0;
+bool HbSelectionDialog::execReturnPrimary = true;
+bool HbSelectionDialog::primaryReturnNull = false;
+bool HbSelectionDialog::secondaryReturnNull = false;
+int HbSelectionDialog::openAmount = 0;
+
+HbSelectionDialog::HbSelectionDialog(QGraphicsItem *parent)
+ : HbDialog(parent)
+ , mModel(0)
+ , mListView(0)
+ , mSelectionMode(HbAbstractItemView::InvalidSelection)
+{
+ currentInstance = this;
+}
+
+HbSelectionDialog::~HbSelectionDialog()
+{
+ mListView = 0;
+ mModel = 0;
+ mSelectionMode = HbAbstractItemView::InvalidSelection;
+ currentInstance = 0;
+}
+
+
+void HbSelectionDialog::setSelectionMode(HbAbstractItemView::SelectionMode mode)
+{
+ mSelectionMode = mode;
+}
+HbAbstractItemView::SelectionMode HbSelectionDialog::selectionMode() const
+{
+ return mSelectionMode;
+}
+
+void HbSelectionDialog::setModel(QAbstractItemModel* model)
+{
+ mModel = model;
+}
+QAbstractItemModel* HbSelectionDialog::model() const
+{
+ return mModel;
+}
+QModelIndexList HbSelectionDialog::selectedModelIndexes() const
+{
+ return mModelIndexList;
+}
+
+void HbSelectionDialog::setSelectedModelIndexes(QModelIndexList list)
+{
+ mModelIndexList.clear();
+ mModelIndexList.append(list);
+}
+
+void HbSelectionDialog::setListView(HbListView* list)
+{
+ mListView = list;
+}
+
+QGraphicsItem* HbSelectionDialog::primitive(const QString &itemName) const
+{
+ if(itemName == "list")
+ {
+ return (QGraphicsItem*)mListView;
+ }
+ return (QGraphicsItem*)this;
+}
+
+QString HbSelectionDialog::selectionTitle() const
+{
+ return QString();
+}
+void HbSelectionDialog::setSelectionTitle(const QString& title)
+{
+ Q_UNUSED(title)
+}
--- a/videocollection/tsrc/stubs/src/hbwidget.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/src/hbwidget.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -18,3 +18,8 @@
#include "hbwidget.h"
int HbWidget::initializeCount = 0;
+
+QGraphicsItem* HbWidget::primitive(const QString &itemName) const
+{
+ return 0;
+}
--- a/videocollection/tsrc/stubs/src/videocollectionuiloader.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videocollectionuiloader.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -234,7 +234,7 @@
{
if(!VideoCollectionUiLoaderData::mFailDialogLoad)
{
- object = new VideoListSelectionDialog(this);
+ object = new VideoListSelectionDialog();
}
else
{
--- a/videocollection/tsrc/stubs/src/videolistselectiondialog.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videolistselectiondialog.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -29,35 +29,24 @@
int VideoListSelectionDialogData::mSelectionType = -1;
TMPXItemId VideoListSelectionDialogData::mSettedMpxId = TMPXItemId::InvalidId();
-VideoListSelectionDialog::VideoListSelectionDialog(
- VideoCollectionUiLoader *uiLoader,
- QGraphicsItem *parent) :
- HbDialog(parent),
- mUiLoader(uiLoader),
- mHeading(0),
- mCheckboxContainer(0),
- mItemCount(0),
- mCheckBox(0),
- mListContainer(0),
- mForcedCheck(false),
- mModel(0),
- mModelReady(false),
- mAlbumListReady(false),
- mListWidget(0),
- mPrimaryAction(0),
- mSecondaryAction(0)
+VideoListSelectionDialog::VideoListSelectionDialog(QGraphicsItem *parent)
+ : HbSelectionDialog(parent)
+ , mModel(0)
+ , mModelReady(false)
+ , mAlbumListReady(false)
+ , mListInitialised( false )
+ , mListWidget(0)
+ , mPrimaryAction(0)
+ , mSecondaryAction(0)
{
- setDismissPolicy(HbDialog::NoDismiss);
- setTimeout(HbDialog::NoTimeout);
-
// create primary action
mPrimaryAction = new HbAction();
-
+
// create secondary action
mSecondaryAction = new HbAction();
}
-VideoListSelectionDialog::~VideoListSelectionDialog()
+VideoListSelectionDialog::~VideoListSelectionDialog()
{
VideoListSelectionDialogData::reset();
}
@@ -92,7 +81,7 @@
}
}
VideoListSelectionDialogData::mMultiSelectionItemSelectionCount = mSelection.indexes().count();
-
+
}
void VideoListSelectionDialog::finishedSlot(HbAction *action)
@@ -109,7 +98,7 @@
void VideoListSelectionDialog::selectionChangedSlot(
const QItemSelection &selected,
const QItemSelection &deselected)
-{
+{
Q_UNUSED(selected);
Q_UNUSED(deselected);
// not stubbed
@@ -145,7 +134,7 @@
{
// not stubbed
}
-
+
void VideoListSelectionDialog::disconnectSignals()
{
// not stubbed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/xqaiwrequest.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* 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 "xqaiwrequeststub.h"
+
+int XQAiwRequest::mSetArgumentsCallCount = 0;
+int XQAiwRequest::mLastErrorReturnValue = 0;
+int XQAiwRequest::mLastErrorCallCount = 0;
+int XQAiwRequest::mSendCallCount = 0;
+bool XQAiwRequest::mSendFails = false;
+int XQAiwRequest::mSetEmbeddedCallCount = 0;
+
+XQAiwRequest::XQAiwRequest()
+{
+
+}
+
+XQAiwRequest::~XQAiwRequest()
+{
+
+}
+
+void XQAiwRequest::setArguments(const QList<QVariant> &arguments)
+{
+ Q_UNUSED(arguments);
+ mSetArgumentsCallCount++;
+}
+
+int XQAiwRequest::lastError() const
+{
+ mLastErrorCallCount++;
+ return mLastErrorReturnValue;
+}
+
+bool XQAiwRequest::send()
+{
+ mSendCallCount++;
+ return !mSendFails;
+}
+
+void XQAiwRequest::setEmbedded(bool embedded)
+{
+ Q_UNUSED(embedded);
+ mSetEmbeddedCallCount++;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/xqappmgr.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* 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 "xqappmgrstub.h"
+
+bool XQApplicationManager::mCreateFails = false;
+int XQApplicationManager::mCreateCallCount = 0;
+
+XQAiwRequest* XQApplicationManager::create( QUrl url )
+{
+ Q_UNUSED(url);
+ mCreateCallCount++;
+ if(!mCreateFails)
+ {
+ return new XQAiwRequest();
+ }
+ return 0;
+}
--- a/videocollection/tsrc/stubs/stubs.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/stubs/stubs.pro Fri Oct 15 16:29:10 2010 +0300
@@ -30,11 +30,12 @@
-lxqservice.dll
HEADERS_TEMP = \
- inc/videoserviceurifetch.h \
- inc/videoservicebrowse.h \
- inc/xqserviceutilstub.h \
- inc/xqserviceproviderstub.h \
- inc/xqsettingsmanagerstub.h \
+ inc/videocollectiontrace.h \
+ inc/videoserviceurifetch.h \
+ inc/videoservicebrowse.h \
+ inc/xqserviceutilstub.h \
+ inc/xqserviceproviderstub.h \
+ inc/xqsettingsmanagerstub.h \
inc/testobjectstore.h \
inc/hbpopup.h \
inc/hbabstractitemview.h \
@@ -43,6 +44,7 @@
inc/hbcheckbox.h \
inc/hbdeviceprofile.h \
inc/hbdialog.h \
+ inc/hbselectiondialog.h \
inc/hbnotificationdialog.h \
inc/hbglobal.h \
inc/hbgroupbox.h \
@@ -83,7 +85,14 @@
inc/xqserviceutilxtra.h \
inc/videooperatorservicedata.h \
inc/videooperatorservice_pdata.h \
- # We need stub for this because it has static data and HW compilation of moc file fails because of that.
+ inc/xqappmgrstub.h \
+ inc/xqaiwrequeststub.h \
+ inc/apaidstub.h \
+ inc/apgclistub.h \
+ inc/videocollectiontrace.h \
+ inc/apgtaskstub.h \
+ inc/coemainstub.h \
+ # We need stub for this because it has static data and HW compilation of moc file fails because of that.
inc/videoservices.h \
../../videocollectionview/inc/videocollectionuiloader.h \
../../videocollectionview/inc/videocollectionviewutils.h \
@@ -101,7 +110,7 @@
../../videocollectionwrapper/inc/videothumbnaildata.h \
../../videocollectionview/inc/videooperatorservice.h \
../../videocollectionview/inc/videooperatorservice_p.h
-
+
SOURCES_TEMP = \
src/xqserviceprovider.cpp \
src/testobjectstore.cpp \
@@ -109,6 +118,7 @@
src/hbaction.cpp \
src/hbcheckbox.cpp \
src/hbdialog.cpp \
+ src/hbselectiondialog.cpp \
src/hbnotificationdialog.cpp \
src/hbinputdialog.cpp \
src/hbglobal.cpp \
@@ -148,8 +158,14 @@
src/videoactivitystate.cpp \
src/videooperatorservice.cpp \
src/videooperatorservice_p.cpp \
- src/videocollectionwrapperdata.cpp \
- src/xqsettingsmanagerstub.cpp
-
+ src/videocollectionwrapperdata.cpp \
+ src/xqsettingsmanagerstub.cpp \
+ src/xqappmgr.cpp \
+ src/xqaiwrequest.cpp \
+ src/apaidstub.cpp \
+ src/apgclistub.cpp \
+ src/apgtask.cpp \
+ src/coemain.cpp
+
HEADERS += $$find(HEADERS_TEMP, ^(?!.*$$TESTEDCLASS).*$)
SOURCES += $$find(SOURCES_TEMP, ^(?!.*$$TESTEDCLASS).*$)
--- a/videocollection/tsrc/videoservicestestapp/videoservicestestapp.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/tsrc/videoservicestestapp/videoservicestestapp.pro Fri Oct 15 16:29:10 2010 +0300
@@ -32,3 +32,6 @@
BLD_INF_RULES.prj_exports += "rom/videoservicestestapp.iby CORE_APP_LAYER_IBY_EXPORT_PATH(videoservicestestapp.iby)"
}
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/data/collectionview.docml Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/data/collectionview.docml Fri Oct 15 16:29:10 2010 +0300
@@ -25,7 +25,6 @@
<widget name="vc:mOptionsMenu" role="HbView:menu" type="HbMenu">
<ref object="vc:mAddtoCollection" role="HbWidget:addAction"/>
<ref object="vc:mCreateNewCollection" role="HbWidget:addAction"/>
- <ref object="vc:mDeleteMultiple" role="HbWidget:addAction"/>
<widget name="vc:mSortBy" role="HbMenu:menu" type="HbMenu">
<ref object="vc:mDate" role="HbWidget:addAction"/>
<ref object="vc:mName" role="HbWidget:addAction"/>
@@ -33,6 +32,7 @@
<ref object="vc:mSize" role="HbWidget:addAction"/>
<string locid="txt_videos_opt_sort_by" name="title"/>
</widget>
+ <ref object="vc:mDeleteMultiple" role="HbWidget:addAction"/>
</widget>
<widget name="content" role="HbView:widget" type="HbWidget">
<widget name="vc:mStackedLayout" type="HbWidget">
--- a/videocollection/videocollectionview/data/hbdialog.css Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-HbDialog::heading {
- min-heigh:6un;
- pref-heigh:6un;
- max-height:12un;
- size-policy-vertical:expanding;
-}
\ No newline at end of file
--- a/videocollection/videocollectionview/data/videocollectionview.qrc Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/data/videocollectionview.qrc Fri Oct 15 16:29:10 2010 +0300
@@ -3,7 +3,4 @@
<file alias="collectionview.docml">collectionview.docml.bin</file>
<file alias="videolistselectiondialog.docml">videolistselectiondialog.docml.bin</file>
</qresource>
- <qresource prefix="/style" >
- <file>hbdialog.css</file>
- </qresource>
</RCC>
--- a/videocollection/videocollectionview/data/videolistselectiondialog.docml Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/data/videolistselectiondialog.docml Fri Oct 15 16:29:10 2010 +0300
@@ -1,59 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.1">
+<hbdocument version="1.2">
<widget name="mMultiSelectionDialog" type="VideoListSelectionDialog">
- <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
- <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
- <widget name="contentContainer" role="HbDialog:contentWidget" type="HbWidget">
- <widget name="mListContainer" type="HbStackedWidget">
- <sizehint height="23.8806un" type="PREFERRED" width="23.8806un"/>
- </widget>
- <widget name="mHeadingLabel" type="HbLabel">
- <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
- <sizehint height="3.9un" type="PREFERRED" width="47.04478un"/>
- <sizehint height="3.9un" type="MAXIMUM"/>
- <string name="plainText" value="Label"/>
- <fontspec name="fontSpec" role="Primary" textheight="26.8"/>
- </widget>
- <widget name="mCheckBoxContainer" type="HbWidget">
- <widget name="mCheckMarkAll" type="HbCheckBox">
- <sizehint height="6un" type="PREFERRED" width="4un"/>
- <sizehint height="4un" type="MINIMUM"/>
- </widget>
- <widget name="mCheckBoxText" type="HbLabel">
- <enums name="alignment" value="AlignAbsolute|AlignLeft|AlignVCenter|AlignLeading"/>
- <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
- <sizehint height="3.9un" type="PREFERRED" width="25.22703un"/>
- <string locid="txt_videos_setlabel_mark_all" name="plainText" value="Mark All"/>
- <fontspec name="fontSpec" role="Primary" textheight="26.8"/>
- </widget>
- <widget name="mSelectionCount" type="HbLabel">
- <enums name="alignment" value="AlignRight|AlignTrailing"/>
- <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
- <sizehint height="3.9un" type="PREFERRED" width="20.22703un"/>
- <string name="plainText" value="Label"/>
- <fontspec name="fontSpec" role="Primary" textheight="26.8"/>
- </widget>
- <bool name="focusLooping" value="FALSE"/>
- <real name="z" value="2"/>
- <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
- <sizehint height="5un" type="PREFERRED" width="23.8806un"/>
- <sizehint height="5un" type="MAXIMUM"/>
- <layout type="anchor">
- <anchoritem dst="mSelectionCount" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="mSelectionCount" dstEdge="TOP" spacing="0.5un" src="" srcEdge="TOP"/>
- <anchoritem dst="mSelectionCount" dstEdge="LEFT" spacing="0un" src="mCheckBoxText" srcEdge="RIGHT"/>
- <anchoritem dst="mCheckBoxText" dstEdge="TOP" spacing="0.5un" src="" srcEdge="TOP"/>
- <anchoritem dst="mCheckMarkAll" dstEdge="TOP" spacing="-1.79104un" src="" srcEdge="TOP"/>
- <anchoritem dst="mCheckMarkAll" dstEdge="RIGHT" spacing="-1.69403un" src="mCheckBoxText" srcEdge="LEFT"/>
- <anchoritem dst="mCheckMarkAll" dstEdge="LEFT" spacing="-1.19403un" src="" srcEdge="LEFT"/>
- </layout>
- </widget>
- <layout orientation="Vertical" type="linear">
- <linearitem itemname="mHeadingLabel"/>
- <linearitem itemname="mCheckBoxContainer"/>
- <linearitem itemname="mListContainer"/>
- </layout>
- </widget>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="var(hb-param-screen-height)" type="FIXED" width="var(hb-param-screen-width)"/>
</widget>
<metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
--- a/videocollection/videocollectionview/inc/videocollectionuiloaderdef.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/inc/videocollectionuiloaderdef.h Fri Oct 15 16:29:10 2010 +0300
@@ -48,12 +48,6 @@
// video multiselection dialog
static const char* DOCML_VIDEOSELECTIONDIALOG_FILE = ":/layout/videolistselectiondialog.docml";
static const char* DOCML_NAME_DIALOG = "mMultiSelectionDialog";
-static const char* DOCML_NAME_DLG_HEADINGLBL = "mHeadingLabel";
-static const char* DOCML_NAME_CHECK_CONTAINER = "mCheckBoxContainer";
-static const char* DOCML_NAME_MARKALL = "mCheckMarkAll";
-static const char* DOCML_NAME_LBL_MARKALL = "mCheckBoxText";
-static const char* DOCML_NAME_LBL_SELECTION = "mSelectionCount";
-static const char* DOCML_NAME_LIST_CONTAINER = "mListContainer";
// async loading timeout
static const int ASYNC_FIND_TIMEOUT = 50; // ms
--- a/videocollection/videocollectionview/inc/videolistselectiondialog.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/inc/videolistselectiondialog.h Fri Oct 15 16:29:10 2010 +0300
@@ -18,24 +18,18 @@
#ifndef VIDEOLISTSELECTIONDIALOG_H
#define VIDEOLISTSELECTIONDIALOG_H
-#include <hbdialog.h>
+#include <hbselectiondialog.h>
#include <qset.h>
-#include <qitemselectionmodel.h>
#include <mpxitemid.h>
+#include <qpointer.h>
-class QGraphicItem;
-class QItemSelection;
-class HbWidget;
-class HbLabel;
-class HbCheckBox;
-class HbStackedWidget;
+class QGraphicsItem;
+class QTimer;
+class VideoProxyModelGeneric;
class VideoCollectionUiLoader;
-class VideoCollectionWrapper;
-class VideoProxyModelGeneric;
-class VideoListWidget;
-class VideoListSelectionDialog: public HbDialog
-{
+class VideoListSelectionDialog: public HbSelectionDialog
+{
/**
* definition required for emitting / connecting signals
*/
@@ -51,6 +45,7 @@
enum TSelectionFunction
{
+ ENoFunction = -1,
EDeleteVideos,
EAddToCollection,
ERemoveFromCollection,
@@ -61,11 +56,10 @@
/**
* Constructor
*
- * @param uiLoader used to load UI components from docml
* @param parent item's parent component
*/
- VideoListSelectionDialog(VideoCollectionUiLoader *uiLoader, QGraphicsItem *parent=0);
-
+ VideoListSelectionDialog(QGraphicsItem *parent=0);
+
/**
* Destructor
*/
@@ -80,8 +74,8 @@
* @param type selection dialog function typy
* @param activeItem id of item that the selection concerns
*/
- void setupContent(int type, TMPXItemId activeItem = TMPXItemId::InvalidId());
-
+ void setupContent(VideoListSelectionDialog::TSelectionFunction type, TMPXItemId activeItem = TMPXItemId::InvalidId());
+
public slots:
/**
@@ -98,35 +92,10 @@
private slots:
/**
- * Slot connected to mCheckBox's stateChanged -signal.
- * Selects or deselects all items if mForcedCheck -flag is false.
- *
- * If Forcedcehck is true, it indeicates that we want to change the checked state
- * only, not slect or deselect anything. This is needed for example if after
- * all items are marked, user manually deselects item's. In that case all is not
- * marked, so checked state needs to be changed.
- *
- * @param state Qt::Checked everything should be set as selected.
+ * disables or enables popup's primary action in case selection changes
*/
- void markAllStateChangedSlot(int state);
-
- /**
- * disables or enables popup's primary action in case selection changes
- *
- * @param selected item selection list containing selected
- * @param deselected item selection list containing not selected (not used in this scope)
- */
- void selectionChangedSlot(const QItemSelection &selected, const QItemSelection &deselected);
-
- /**
- * connected to list's activated -signal. Called when singel item is selected.
- * If dialog's selection type is ESelectCollection, saves mpx id from provided index.
- * and closes dialog by triggering primary action
- *
- * @param index of item selected
- */
- void singleItemSelectedSlot(const QModelIndex &index);
-
+ void selectionChangedSlot();
+
/**
* Handles model ready signal from model.
*/
@@ -138,12 +107,6 @@
void albumListReadySlot();
/**
- * Changes the counter value. Sets the checkbutton state based on selection count.
- *
- */
- void updateCounterSlot();
-
- /**
* Primary action triggered signal slot.
*
*/
@@ -155,7 +118,42 @@
* @param action causing the finished
*/
void finishedSlot(HbAction *action);
-
+
+ /**
+ * Signaled when view scrolling starts, pauses thumbnail creation.
+ *
+ */
+ void scrollingStartedSlot();
+
+ /**
+ * Signaled when view scrolling ends, initiates thumbnail fetching
+ * at index of first visible item and enables creation of thumbnails.
+ *
+ */
+ void scrollingEndedSlot();
+
+ /**
+ * Signaled when view scroll position changes, initiates timer to
+ * fetch thumbnails at index of first visible item.
+ *
+ * @param newPosition scroll position
+ *
+ */
+ void scrollPositionChangedSlot(const QPointF &newPosition);
+
+ /**
+ * Signaled when scroll position timer triggers. Starts fetching thumbnails
+ * for visible items.
+ *
+ */
+ void scrollPositionTimerSlot();
+
+ /**
+ * Fetches thumbnails for the visible items.
+ *
+ */
+ void fetchThumbnailsForVisibleItems();
+
private:
/**
@@ -165,12 +163,24 @@
* @return bool true if inisializaion ok
*/
bool initDialog();
-
+
+ /**
+ * Method initializes list by setting the model
+ *
+ * @param model to be set
+ *
+ * @return bool true if inisializaion ok
+ */
+ bool initList(VideoProxyModelGeneric *model);
+
/**
* Method activated dialog based on value in mTypeOfSelection
+ *
+ * @param changeMode true if dialog mode is changed from multiselection to noselection while visible
+ *
*/
- void activateSelection();
-
+ void activateSelection(bool changeMode = false);
+
/**
* connects all required signals into appropriate slots
* for selection mode
@@ -197,20 +207,10 @@
private:
/**
- * docml UI loader, not owned
- */
- VideoCollectionUiLoader *mUiLoader;
-
- /**
* type for defining selection functionality
*/
- int mTypeOfSelection;
-
- /**
- * Selection
- */
- QItemSelection mSelection;
-
+ VideoListSelectionDialog::TSelectionFunction mTypeOfSelection;
+
/**
* Selected video items
*/
@@ -227,42 +227,6 @@
QString mNewAlbumText;
/**
- * header label
- */
- HbLabel *mHeading;
-
- /**
- * container widget for itemcount and checkbox;
- */
- HbWidget *mCheckboxContainer;
-
- /**
- * counter label from docml
- */
- HbLabel *mItemCount;
-
- /**
- * checkbox label from docml
- */
- HbLabel *mCheckBoxText;
-
- /**
- * mark all checkbox
- */
- HbCheckBox *mCheckBox;
-
- /**
- * videolist container in dialog
- */
- HbStackedWidget *mListContainer;
-
- /**
- * flag indicating that we've changed check-btn state
- * explicitly and don't wanna handle selection based on that
- */
- bool mForcedCheck;
-
- /**
* Video list model
*/
VideoProxyModelGeneric *mModel;
@@ -276,21 +240,27 @@
* Boolean to know if album list is ready or not.
*/
bool mAlbumListReady;
-
- /**
- * List widget to show in selection
+
+ /**
+ * Boolean to know if listview has been initialised or not.
*/
- VideoListWidget *mListWidget;
-
+ bool mListInitialised;
+
/**
* Action to accept the selection dialog.
*/
- HbAction *mPrimaryAction;
-
+ QPointer<HbAction> mPrimaryAction;
+
/**
* Action to cancel the selection dialog.
*/
- HbAction *mSecondaryAction;
+ QPointer<HbAction> mSecondaryAction;
+
+ /**
+ * Timer used to report thumbnail fetches class index of
+ * first visible item when view is scrolling.
+ */
+ QPointer<QTimer> mScrollPositionTimer;
};
#endif //VIDEOLISTSELECTIONDIALOG_H
--- a/videocollection/videocollectionview/inc/videolistview.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/inc/videolistview.h Fri Oct 15 16:29:10 2010 +0300
@@ -254,6 +254,14 @@
void updateSubLabel();
/**
+ * Disables or enables menu, depending on video list row count.
+ * If no items are present the menu is disabled, ie it does
+ * not respond to users clickking. If items are present
+ * the menu is enabled.
+ */
+ void updateMenuShowState();
+
+ /**
* Activates all videos or collections -list.
*
* @return int 0 ok
--- a/videocollection/videocollectionview/inc/videooperatorservice_p.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/inc/videooperatorservice_p.h Fri Oct 15 16:29:10 2010 +0300
@@ -24,6 +24,7 @@
#include <e32cmn.h>
class VideoOperatorService;
+class XQApplicationManager;
/**
* Private functionality for loading and launching operator customisable services.
@@ -107,6 +108,13 @@
*/
void startApplicationL(const TUid uid);
+ /**
+ * Launches an URL using Qt Highway.
+ *
+ * @param url to the service.
+ */
+ void launchUrl(QString url);
+
public slots:
/**
@@ -145,6 +153,11 @@
* Pointer to started process.
*/
QProcess *mProcess;
+
+ /**
+ * Application manager is used to launch service with URL.
+ */
+ XQApplicationManager *mAppMgr;
};
#endif // VIDEOOPERATORSERVICEPRIVATE_H
--- a/videocollection/videocollectionview/src/videocollectionuiloader.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/src/videocollectionuiloader.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 24.1.2 %
+// Version : %version: 24.1.3 %
// INCLUDE FILES
#include <qgraphicswidget.h>
@@ -412,17 +412,6 @@
}
}
}
- else if (name.compare(DOCML_NAME_DIALOG) == 0)
- {
- // by default, initialize the selection dialog to delete mode
- VideoListSelectionDialog *dialog =
- qobject_cast<VideoListSelectionDialog*>(object);
- if (dialog)
- {
- dialog->setupContent(VideoListSelectionDialog::EDeleteVideos,
- TMPXItemId::InvalidId());
- }
- }
else if (name.compare(DOCML_NAME_SORT_MENU) == 0)
{
HbMenu *menu = qobject_cast<HbMenu*>(object);
@@ -664,7 +653,7 @@
}
else if ( type == VideoListSelectionDialog::staticMetaObject.className() )
{
- object = new VideoListSelectionDialog(this);
+ object = new VideoListSelectionDialog();
}
else if ( type == VideoListWidget::staticMetaObject.className() )
{
--- a/videocollection/videocollectionview/src/videolistmenu.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/src/videolistmenu.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 1 %
+// Version : %version: 1.1.1 %
// INCLUDE FILES
@@ -188,7 +188,7 @@
HbMenu* sortMenu = mUiLoader->findWidget<HbMenu>(DOCML_NAME_SORT_MENU);
if(action == sortMenu->menuAction()) // make sure that active action is the sort menu.
{
- HbAction* action = sortMenu->activeAction();
+ HbAction* action = qobject_cast<HbAction*>(sender());
if(action)
{
doSorting(mSortingRoles[action]);
--- a/videocollection/videocollectionview/src/videolistselectiondialog.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/src/videolistselectiondialog.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -15,35 +15,38 @@
*
*/
-// Version : %version: 30.1.5 %
+// Version : %version: 30.1.7 %
// INCLUDE FILES
#include <qgraphicsitem.h>
-#include <hblabel.h>
-#include <hbcheckbox.h>
+#include <qtimer.h>
+
+#include <vcxmyvideosdefs.h>
+
#include <hbaction.h>
-#include <hbstackedwidget.h>
#include <hbabstractitemview.h>
#include <hbinputdialog.h>
-#include <vcxmyvideosdefs.h>
-#include <hbstyleloader.h>
+#include <hbwidget.h>
+#include <hblistview.h>
+#include <hblistviewitem.h>
-#include "videocollectionuiloader.h"
-#include "videolistwidget.h"
#include "videoproxymodelgeneric.h"
#include "videolistselectiondialog.h"
#include "videocollectionwrapper.h"
#include "videocollectionviewutils.h"
#include "videocollectionclient.h"
#include "videocollectiontrace.h"
+#include "videothumbnaildata.h"
// Object names.
-const char* const SELECTION_DIALOG_OBJECT_NAME_LIST_WIDGET = "vc:SelectionDialogListWidget";
const char* const SELECTION_DIALOG_OBJECT_NAME_NEW_COLLECTION = "vc:SelectionDialogNewCollection";
const char* const LIST_VIEW_OBJECT_NAME_CREATE_COLLECTION = "vc::ListViewInputDialogCreateCollection";
const char* const SELECTION_DIALOG_OBJECT_NAME_BUTTON_OK = "vc:SelectionDialogButtonOk";
const char* const SELECTION_DIALOG_OBJECT_NAME_BUTTON_CANCEL = "vc:SelectionDialogButtonCancel";
+// Interval in ms to report the scroll position.
+const int SCROLL_POSITION_TIMER_TIMEOUT = 100;
+
/**
* global qHash function required fo creating hash values for TMPXItemId -keys
*/
@@ -73,49 +76,22 @@
// VideoListSelectionDialog
// ---------------------------------------------------------------------------
//
-VideoListSelectionDialog::VideoListSelectionDialog( VideoCollectionUiLoader *uiLoader,
- QGraphicsItem *parent)
- : HbDialog( parent )
- , mUiLoader( uiLoader )
- , mTypeOfSelection( -1 )
- , mHeading( 0 )
- , mCheckboxContainer( 0 )
- , mItemCount( 0 )
- , mCheckBoxText( 0 )
- , mCheckBox( 0 )
- , mListContainer( 0 )
- , mForcedCheck( false )
+VideoListSelectionDialog::VideoListSelectionDialog( QGraphicsItem *parent)
+ : HbSelectionDialog( parent )
+ , mTypeOfSelection( ENoFunction )
, mModel( 0 )
, mModelReady( false )
, mAlbumListReady( false )
- , mListWidget( 0 )
+ , mListInitialised( false )
, mPrimaryAction( 0 )
, mSecondaryAction( 0 )
+ , mScrollPositionTimer( 0 )
{
FUNC_LOG;
-
- HbStyleLoader::registerFilePath( ":/style/hbdialog.css" );
- setDismissPolicy(HbDialog::NoDismiss);
- setTimeout(HbDialog::NoTimeout);
-
- // create model for list widget
- mModel =
- VideoCollectionWrapper::instance().getGenericModel();
- if (mModel)
- {
- // create list widget
- mListWidget = new VideoListWidget(mUiLoader);
- if(mListWidget->initialize(*mModel) < 0)
- {
- ERROR(-1, "VideoListSelectionDialog::VideoListSelectionDialog() failed to init list widget");
- delete mListWidget;
- mListWidget = 0;
- }
- // disable list related animations to make dialog faster
- mListWidget->setEnabledAnimations(HbAbstractItemView::None);
- mListWidget->setObjectName(SELECTION_DIALOG_OBJECT_NAME_LIST_WIDGET);
- }
+ // create model and init list, this will create listview in HbSelectionDialog
+ mModel = VideoCollectionWrapper::instance().getGenericModel();
+ initList(0);
}
// ---------------------------------------------------------------------------
@@ -125,20 +101,21 @@
VideoListSelectionDialog::~VideoListSelectionDialog()
{
FUNC_LOG;
- HbStyleLoader::unregisterFilePath( ":/style/hbdialog.css" );
- delete mListWidget;
- mListWidget = 0;
+
+ delete mScrollPositionTimer;
+ delete mPrimaryAction;
+ delete mSecondaryAction;
}
// ---------------------------------------------------------------------------
// setupContent
// ---------------------------------------------------------------------------
//
-void VideoListSelectionDialog::setupContent(int type, TMPXItemId activeItem)
+void VideoListSelectionDialog::setupContent(VideoListSelectionDialog::TSelectionFunction type, TMPXItemId activeItem)
{
FUNC_LOG;
INFO_1("VideoListSelectionDialog::setupContent() type: %d", type);
- if(type < EDeleteVideos || type > ESelectCollection)
+ if(type == ENoFunction)
{
return;
}
@@ -149,7 +126,6 @@
ERROR(-1, "VideoListSelectionDialog::setupContent() dialog init failed.");
return;
}
- mSelection.clear();
mSelectedVideos.clear();
mSelectedAlbumId = TMPXItemId::InvalidId();
mNewAlbumText = QString();
@@ -194,84 +170,174 @@
return false;
}
}
- if (!mListContainer)
+
+ if(!mScrollPositionTimer)
{
- mListContainer =
- mUiLoader->findWidget<HbStackedWidget>(DOCML_NAME_LIST_CONTAINER);
-
- if(!mListWidget)
+ mScrollPositionTimer = new QTimer();
+ mScrollPositionTimer->setSingleShot(true);
+ }
+ return true;
+}
+
+// ---------------------------------------------------------------------------
+// initList
+// ---------------------------------------------------------------------------
+//
+bool VideoListSelectionDialog::initList(VideoProxyModelGeneric *model)
+{
+ FUNC_LOG;
+
+ setModel(model);
+
+ if(!mListInitialised)
+ {
+ HbWidget* content = static_cast<HbWidget*>(this->primitive("content"));
+ if(content)
{
- mListWidget = new VideoListWidget(mUiLoader);
- mListWidget->setObjectName(SELECTION_DIALOG_OBJECT_NAME_LIST_WIDGET);
- if(mListWidget->initialize(*mModel) < 0)
+ HbListView* view = static_cast<HbListView*>(content->primitive("list"));
+ if (view)
{
- ERROR(-1, "VideoListSelectionDialog::initDialog() failed to setup VideoListWidget.");
- delete mListWidget;
- mListWidget = 0;
- mListContainer = 0;
- return false;
+ HbListViewItem *prototype = view->listItemPrototype();
+ if(prototype)
+ {
+ prototype->setGraphicsSize(HbListViewItem::WideThumbnail);
+ }
+ view->setItemRecycling(true);
+ view->setClampingStyle(HbScrollArea::BounceBackClamping);
+ view->setScrollingStyle(HbScrollArea::PanWithFollowOn);
+ view->setFrictionEnabled(true);
+ view->setUniformItemSizes(true);
+ view->setSelectionMode(HbAbstractItemView::NoSelection);
+ view->setItemPixmapCacheEnabled(true);
+ view->setEnabledAnimations(HbAbstractItemView::None);
+
+ mListInitialised = true;
}
}
- if(mListContainer)
- {
- mListContainer->addWidget(mListWidget);
- }
}
-
- if(!mHeading)
- {
- mHeading = mUiLoader->findWidget<HbLabel>(DOCML_NAME_DLG_HEADINGLBL);
- }
- if(!mCheckboxContainer)
- {
- mCheckboxContainer = mUiLoader->findWidget<HbWidget>(DOCML_NAME_CHECK_CONTAINER);
- }
- if(!mItemCount)
- {
- mItemCount = mUiLoader->findWidget<HbLabel>(DOCML_NAME_LBL_SELECTION);
- mItemCount->setAlignment(Qt::AlignRight);
- }
- if(!mCheckBox)
- {
- mCheckBox = mUiLoader->findWidget<HbCheckBox >(DOCML_NAME_MARKALL);
- }
-
- if(!mCheckBoxText)
- {
- mCheckBoxText = mUiLoader->findWidget<HbLabel >(DOCML_NAME_LBL_MARKALL);
- }
-
- // HbDialog connects actions to finished signal by default.
- if(!mPrimaryAction)
- {
- mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok"));
- mPrimaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_OK);
- addAction(mPrimaryAction);
- }
- if(!mSecondaryAction)
- {
- mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"));
- mSecondaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_CANCEL);
- addAction(mSecondaryAction);
- }
-
- if(!mListContainer || !mHeading || !mCheckBox || !mCheckBoxText)
- {
- ERROR(-1, "VideoListSelectionDialog::initDialog() !mListContainer || !mHeading || !mCheckBox || !mCheckBoxText");
- return false;
- }
- return true;
+ return mListInitialised;
}
// ---------------------------------------------------------------------------
// activateSelection
// ---------------------------------------------------------------------------
//
-void VideoListSelectionDialog::activateSelection()
+void VideoListSelectionDialog::activateSelection(bool changeMode)
{
FUNC_LOG;
+ QString headingTxt("");
+ QString primaryTxt("");
+ // create texts
+ switch(mTypeOfSelection)
+ {
+ case EDeleteVideos:
+ primaryTxt = hbTrId("txt_common_button_delete");
+ headingTxt = hbTrId("txt_videos_title_delete_videos");
+ break;
+ case EAddToCollection:
+ primaryTxt = hbTrId("txt_common_button_add");
+ headingTxt = hbTrId("txt_videos_title_add_videos");
+ break;
+ case ECreateCollection:
+ primaryTxt = hbTrId("txt_common_button_ok");
+ headingTxt = hbTrId("txt_videos_title_add_videos");
+ break;
+ case ERemoveFromCollection:
+ primaryTxt = hbTrId("txt_common_button_remove");
+ headingTxt = hbTrId("txt_videos_title_remove_videos");
+ break;
+ case ESelectCollection:
+ primaryTxt = hbTrId("txt_videos_button_new");
+ headingTxt = hbTrId("txt_videos_title_select_collection");
+ break;
+ default:
+ break;
+ }
+
+ mModelReady = false;
+ mAlbumListReady = false;
+ setModel(0);
+
+ if(mTypeOfSelection == ESelectCollection)
+ {
+ mModel->open(VideoCollectionCommon::ELevelCategory);
+ VideoCollectionViewUtils::sortModel(mModel, false, VideoCollectionCommon::ELevelCategory);
+
+ setModel(mModel);
+ setSelectionMode(HbAbstractItemView::NoSelection);
+
+ if(changeMode)
+ {
+ removeAction(mSecondaryAction);
+ if(!mPrimaryAction)
+ {
+ mPrimaryAction = new HbAction();
+ mPrimaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_OK);
+ addAction(mPrimaryAction);
+ }
+ // New collection button is always enabled for collection selection.
+ mPrimaryAction->setDisabled(false);
+ }
+ else
+ {
+ clearActions();
+
+ if(!mPrimaryAction)
+ {
+ mPrimaryAction = new HbAction(primaryTxt);
+ mPrimaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_OK);
+ }
+ else
+ {
+ mPrimaryAction->setText(primaryTxt);
+ }
+ addAction(mPrimaryAction);
+
+ if(!mSecondaryAction)
+ {
+ mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"));
+ mSecondaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_CANCEL);
+ }
+ addAction(mSecondaryAction);
+
+ // New collection button is always enabled for collection selection.
+ mPrimaryAction->setDisabled(false);
+ }
+ }
+ else
+ {
+ mModel->open(VideoCollectionCommon::ELevelVideos);
+ VideoCollectionViewUtils::sortModel(mModel, false, VideoCollectionCommon::ELevelVideos);
+
+ setModel(mModel);
+ setSelectionMode(HbAbstractItemView::MultiSelection);
+ clearActions();
+
+ if(!mPrimaryAction)
+ {
+ mPrimaryAction = new HbAction(primaryTxt);
+ mPrimaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_OK);
+ }
+ else
+ {
+ mPrimaryAction->setText(primaryTxt);
+ }
+ addAction(mPrimaryAction);
+
+ // Add button will be enabled when videos are selected from the list.
+ mPrimaryAction->setDisabled(mTypeOfSelection != ECreateCollection);
+
+ if(!mSecondaryAction)
+ {
+ mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"));
+ mSecondaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_CANCEL);
+ }
+ addAction(mSecondaryAction);
+ }
+ setHeadingText(headingTxt);
+
// "add to collection", "remove from collection" and "create collection" -selections
- // needs additional functionality for primary key
+ // needs additional functionality for primary key
if(mTypeOfSelection == EAddToCollection ||
mTypeOfSelection == ERemoveFromCollection ||
mTypeOfSelection == ECreateCollection)
@@ -279,60 +345,6 @@
mPrimaryAction->disconnect(SIGNAL(triggered()));
connect(mPrimaryAction, SIGNAL(triggered()), this, SLOT(primaryActionTriggeredSlot()));
}
- QString headingTxt("");
- QString primaryTxt("");
- // create texts
- switch(mTypeOfSelection)
- {
- case EDeleteVideos:
- primaryTxt = hbTrId("txt_common_button_delete");
- break;
- case EAddToCollection:
- primaryTxt = hbTrId("txt_common_button_add");
- break;
- case ECreateCollection:
- primaryTxt = hbTrId("txt_common_button_ok");
- break;
- case ERemoveFromCollection:
- primaryTxt = hbTrId("txt_common_button_remove");
- break;
- case ESelectCollection:
- primaryTxt = hbTrId("txt_videos_button_new");
- break;
- default:
- break;
- }
-
- mPrimaryAction->setText(primaryTxt);
-
- mModelReady = false;
- mAlbumListReady = false;
-
- if(mTypeOfSelection == ESelectCollection)
- {
- headingTxt = hbTrId("txt_videos_title_select_collection");
- mCheckboxContainer->setVisible(false);
- mListWidget->setSelectionMode(-1);
- mListWidget->activate(VideoCollectionCommon::ELevelCategory);
- // New collection button is always enabled for collection selection.
- mPrimaryAction->setDisabled(false);
- }
- else
- {
- headingTxt = hbTrId("txt_videos_title_select_videos");
- mListWidget->setSelectionMode(HbAbstractItemView::MultiSelection);
- mListWidget->activate(VideoCollectionCommon::ELevelVideos);
- mCheckboxContainer->setVisible(true);
- mItemCount->setPlainText(tr("0/%1").arg(mModel->rowCount()));
- mCheckBox->setChecked(false);
-
- // Add button will be enabled when videos are selected from the list.
- mPrimaryAction->setDisabled(mTypeOfSelection != ECreateCollection);
- }
- mHeading->setPlainText(headingTxt);
- // sort to make sure dialog has correctly filtered content
- // at the same order as in view
- VideoCollectionViewUtils::sortModel(mModel, false, mListWidget->getLevel());
}
// ---------------------------------------------------------------------------
@@ -342,15 +354,8 @@
void VideoListSelectionDialog::exec()
{
FUNC_LOG;
- // clear checkbox
- mCheckBox->setChecked(false);
-
- mListWidget->clearSelection();
-
- // scroll list back to top
- mListWidget->scrollTo(mModel->index(0, 0));
-
- connectSignals();
+
+ connectSignals();
if(mTypeOfSelection == ECreateCollection)
{
@@ -361,7 +366,9 @@
else if(mModel->rowCount())
{
// show dialog
- HbDialog::open();
+ VideoThumbnailData::instance().enableBackgroundFetching(true);
+ fetchThumbnailsForVisibleItems();
+ HbSelectionDialog::open();
}
else if((mModelReady && mTypeOfSelection != ESelectCollection) ||
(mAlbumListReady && mTypeOfSelection == ESelectCollection))
@@ -380,10 +387,37 @@
{
FUNC_LOG;
disconnectSignals();
- if(action == mSecondaryAction)
+ if(mScrollPositionTimer)
+ {
+ if(mScrollPositionTimer->isActive())
+ {
+ mScrollPositionTimer->stop();
+ }
+ delete mScrollPositionTimer;
+ mScrollPositionTimer = 0;
+ }
+ if(action != mPrimaryAction)
{
- INFO("VideoListSelectionDialog::exec(): secondary action triggered.")
- return;
+ if(mTypeOfSelection == ESelectCollection)
+ {
+ QModelIndexList selection = selectedModelIndexes();
+ int count(selection.count());
+
+ if((count == 1) && (selection.at(0).isValid()))
+ {
+ mSelectedAlbumId = mModel->getMediaIdAtIndex(selection.at(0));
+ }
+ else
+ {
+ INFO("VideoListSelectionDialog::exec(): secondary action triggered.")
+ return;
+ }
+ }
+ else
+ {
+ INFO("VideoListSelectionDialog::exec(): secondary action triggered.")
+ return;
+ }
}
if(mTypeOfSelection == ESelectCollection)
@@ -430,7 +464,9 @@
{
mNewAlbumText = text;
// show video selection dialog
- HbDialog::open();
+ VideoThumbnailData::instance().enableBackgroundFetching(true);
+ fetchThumbnailsForVisibleItems();
+ HbSelectionDialog::open();
}
else
{
@@ -457,6 +493,8 @@
//
void VideoListSelectionDialog::finalize(QString albumName)
{
+ close();
+
// Must be checked again if type was ESelectCollection
if(mTypeOfSelection == EAddToCollection ||
mTypeOfSelection == ECreateCollection)
@@ -501,64 +539,37 @@
// user is deleting videos
else if(mTypeOfSelection == EDeleteVideos)
{
- QVariant data = mSelection.indexes().count();
+ QModelIndexList selection = selectedModelIndexes();
+ QVariant data = selection.count();
+
VideoCollectionViewUtils::instance().showStatusMsgSlot(
VideoCollectionCommon::statusDeleteInProgress,
data);
- // delete items
- mModel->deleteItems(mSelection.indexes());
- }
-}
-
-// ---------------------------------------------------------------------------
-// markAllStateChanged
-// ---------------------------------------------------------------------------
-//
-void VideoListSelectionDialog::markAllStateChangedSlot(int state)
-{
- FUNC_LOG;
- if(mForcedCheck)
- {
- return;
+ // delete items
+ mModel->deleteItems(selection);
}
- if(state == Qt::Checked)
- {
- mListWidget->selectAll();
- }
- else
- {
- mListWidget->clearSelection();
- }
}
// ---------------------------------------------------------------------------
// selectionChangedSlot
// ---------------------------------------------------------------------------
//
-void VideoListSelectionDialog::selectionChangedSlot(const QItemSelection &selected, const QItemSelection &deselected)
-{
- FUNC_LOG;
+void VideoListSelectionDialog::selectionChangedSlot()
+{
+ FUNC_LOG;
if(!mPrimaryAction || mTypeOfSelection == ESelectCollection)
{
INFO("VideoListSelectionDialog::selectionChangedSlot(): no primary action or we are selecting collection.")
return;
}
-
- if(selected.indexes().count() > 0)
- {
- mSelection.merge(selected, QItemSelectionModel::Select);
- }
-
- if(deselected.indexes().count() > 0)
- {
- mSelection.merge(deselected, QItemSelectionModel::Deselect);
- }
-
- if(mSelection.indexes().count() > 0)
+
+ QModelIndexList selected(selectedModelIndexes());
+
+ if(selected.count() > 0)
{
mPrimaryAction->setDisabled(false);
-
if(mTypeOfSelection == ECreateCollection)
+
{
mPrimaryAction->setText(hbTrId("txt_common_button_add"));
}
@@ -571,25 +582,6 @@
{
mPrimaryAction->setText(hbTrId("txt_common_button_ok"));
}
- }
-
- updateCounterSlot();
-}
-
-// ---------------------------------------------------------------------------
-// singleItemSelectedSlot
-// ---------------------------------------------------------------------------
-//
-void VideoListSelectionDialog::singleItemSelectedSlot(const QModelIndex &index)
-{
- FUNC_LOG;
- if(mTypeOfSelection == ESelectCollection)
- {
- if(index.isValid())
- {
- mSelectedAlbumId = mModel->getMediaIdAtIndex(index);
- mPrimaryAction->trigger();
- }
}
}
@@ -618,21 +610,15 @@
{
finishedSlot(mPrimaryAction);
}
-
return;
}
// if dialog is not yet visible, bring it visible.
if(!isVisible() && mTypeOfSelection != ECreateCollection)
{
- // scroll list back to top
- mListWidget->scrollTo(mModel->index(0, 0));
-
- HbDialog::open();
+ HbSelectionDialog::open();
}
-
- updateCounterSlot();
- }
+ }
}
// ---------------------------------------------------------------------------
@@ -650,48 +636,19 @@
finishedSlot(mPrimaryAction);
return;
}
-
+ else
+ {
+ mPrimaryAction->setText(hbTrId("txt_videos_button_new"));
+ }
// if dialog is not yet visible, bring it visible.
if(!isVisible())
{
- // scroll list back to top
- mListWidget->scrollTo(mModel->index(0, 0));
-
- HbDialog::open();
+ HbSelectionDialog::open();
}
-
- updateCounterSlot();
}
}
// ---------------------------------------------------------------------------
-// updateCounterSlot
-// ---------------------------------------------------------------------------
-//
-void VideoListSelectionDialog::updateCounterSlot()
-{
- FUNC_LOG;
- if(!mItemCount)
- {
- return;
- }
-
- int rowCount = mModel->rowCount();
- int selectionCount = mSelection.indexes().count();
- mItemCount->setPlainText(tr("%1/%2").arg(selectionCount).arg(rowCount));
- mForcedCheck = true;
- if(selectionCount == rowCount && rowCount > 0)
- {
- mCheckBox->setChecked(true);
- }
- else
- {
- mCheckBox->setChecked(false);
- }
- mForcedCheck = false;
-}
-
-// ---------------------------------------------------------------------------
// primaryActionTriggeredSlot
// ---------------------------------------------------------------------------
//
@@ -703,7 +660,7 @@
connect(mPrimaryAction, SIGNAL(triggered()), this, SLOT(close()));
// update video items selection here before content changes.
- QModelIndexList indexes = mSelection.indexes();
+ QModelIndexList indexes = selectedModelIndexes();
int count = indexes.count();
TMPXItemId id = TMPXItemId::InvalidId();
for(int i = 0; i < count; ++i)
@@ -728,8 +685,8 @@
// videos for collection selected, but collection
// not yet selected, activate selection for it
mTypeOfSelection = ESelectCollection;
- activateSelection();
- }
+ activateSelection(true);
+ }
}
// ---------------------------------------------------------------------------
@@ -741,23 +698,31 @@
FUNC_LOG;
// dialog finished
connect(this, SIGNAL(finished(HbAction*)), this, SLOT(finishedSlot(HbAction*)));
-
- // selection changes
- connect(mListWidget, SIGNAL(activated(const QModelIndex&)),
- this, SLOT(singleItemSelectedSlot(const QModelIndex&)));
-
- connect(mListWidget->selectionModel(), SIGNAL(selectionChanged (const QItemSelection&, const QItemSelection&)),
- this, SLOT(selectionChangedSlot(const QItemSelection&, const QItemSelection &)));
+
+ //selection changes
+ connect(this, SIGNAL(selectionChanged()), this, SLOT(selectionChangedSlot()));
// model changes signals
connect(mModel->sourceModel(), SIGNAL(modelReady()), this, SLOT(modelReadySlot()));
connect(mModel->sourceModel(), SIGNAL(albumListReady()), this, SLOT(albumListReadySlot()));
- connect(mModel->sourceModel(), SIGNAL(modelChanged()), this, SLOT(updateCounterSlot()));
-
- // mark all state changes
- connect(mCheckBox, SIGNAL(stateChanged(int)), this, SLOT(markAllStateChangedSlot(int)));
+
+ connect(mScrollPositionTimer, SIGNAL(timeout()), this, SLOT(scrollPositionTimerSlot()));
+
+ HbWidget* content = static_cast<HbWidget*>(this->primitive("content"));
+ HbListView* view(0);
+ if(content)
+ {
+ view = static_cast<HbListView*>(content->primitive("list"));
+ if (view)
+ {
+ connect(view, SIGNAL(scrollingEnded()), this, SLOT(scrollingEndedSlot()));
+ connect(view, SIGNAL(scrollingStarted()), this, SLOT(scrollingStartedSlot()));
+ connect(view, SIGNAL(scrollPositionChanged(const QPointF &)),
+ this, SLOT(scrollPositionChangedSlot(const QPointF &)));
+ }
+ }
}
-
+
// ---------------------------------------------------------------------------
// disconnectSignals
// ---------------------------------------------------------------------------
@@ -766,20 +731,35 @@
{
FUNC_LOG;
disconnect(this, SIGNAL(finished(HbAction*)), this, SLOT(finishedSlot(HbAction*)));
-
- disconnect(mListWidget, SIGNAL(activated(const QModelIndex&)),
- this, SLOT(singleItemSelectedSlot(const QModelIndex&)));
-
- disconnect(mListWidget->selectionModel(), SIGNAL(selectionChanged (const QItemSelection&, const QItemSelection&)),
- this, SLOT(selectionChangedSlot(const QItemSelection&, const QItemSelection &)));
+
+ //selection changes
+ disconnect(this, SIGNAL(selectionChanged()), this, SLOT(selectionChangedSlot()));
// model changes signals
- disconnect(mModel->sourceModel(), SIGNAL(modelReady()), this, SLOT(modelReadySlot()));
+ disconnect(mModel->sourceModel(), SIGNAL(modelReady()), this, SLOT(modelReadySlot()));
disconnect(mModel->sourceModel(), SIGNAL(albumListReady()), this, SLOT(albumListReadySlot()));
- disconnect(mModel->sourceModel(), SIGNAL(modelChanged()), this, SLOT(updateCounterSlot()));
-
- // mark all state changes
- disconnect(mCheckBox, SIGNAL(stateChanged(int)), this, SLOT(markAllStateChangedSlot(int)));
+
+ // check that scroll position timer is created
+ if (mScrollPositionTimer)
+ {
+ disconnect(
+ mScrollPositionTimer, SIGNAL(timeout()),
+ this, SLOT(scrollPositionTimerSlot()));
+ }
+
+ HbWidget* content = static_cast<HbWidget*>(this->primitive("content"));
+ HbListView* view(0);
+ if(content)
+ {
+ view = static_cast<HbListView*>(content->primitive("list"));
+ if (view)
+ {
+ disconnect(view, SIGNAL(scrollingEnded()), this, SLOT(scrollingEndedSlot()));
+ disconnect(view, SIGNAL(scrollingStarted()), this, SLOT(scrollingStartedSlot()));
+ disconnect(view, SIGNAL(scrollPositionChanged(const QPointF &)),
+ this, SLOT(scrollPositionChangedSlot(const QPointF &)));
+ }
+ }
}
// ---------------------------------------------------------------------------
@@ -792,8 +772,8 @@
QString name;
if(mSelectedAlbumId.iId2 > KVcxMvcMediaTypeVideo)
{
- VideoProxyModelGeneric *model =
- VideoCollectionWrapper::instance().getGenericModel();
+ VideoProxyModelGeneric *model = VideoCollectionWrapper::instance().getGenericModel();
+
if(!model)
{
return name;
@@ -807,4 +787,93 @@
return name;
}
+// ---------------------------------------------------------------------------
+// scrollingStartedSlot
+// ---------------------------------------------------------------------------
+//
+void VideoListSelectionDialog::scrollingStartedSlot()
+{
+ FUNC_LOG_ADDR(this);
+ VideoThumbnailData::instance().enableThumbnailCreation(false);
+}
+
+// ---------------------------------------------------------------------------
+// scrollingEndedSlot
+// ---------------------------------------------------------------------------
+//
+void VideoListSelectionDialog::scrollingEndedSlot()
+{
+ FUNC_LOG_ADDR(this);
+
+ if(mScrollPositionTimer)
+ {
+ mScrollPositionTimer->stop();
+ }
+
+ VideoThumbnailData::instance().enableBackgroundFetching(true);
+ VideoThumbnailData::instance().enableThumbnailCreation(true);
+ fetchThumbnailsForVisibleItems();
+}
+
+// ---------------------------------------------------------------------------
+// scrollPositionChangedSlot
+// ---------------------------------------------------------------------------
+//
+void VideoListSelectionDialog::scrollPositionChangedSlot(const QPointF &newPosition)
+{
+ Q_UNUSED(newPosition);
+
+ if(mScrollPositionTimer && !mScrollPositionTimer->isActive())
+ mScrollPositionTimer->start(SCROLL_POSITION_TIMER_TIMEOUT);
+}
+
+// ---------------------------------------------------------------------------
+// scrollPositionTimerSlot
+// ---------------------------------------------------------------------------
+//
+void VideoListSelectionDialog::scrollPositionTimerSlot()
+{
+ FUNC_LOG_ADDR(this);
+
+ fetchThumbnailsForVisibleItems();
+}
+
+// ---------------------------------------------------------------------------
+// fetchThumbnailsForVisibleItems
+// ---------------------------------------------------------------------------
+//
+void VideoListSelectionDialog::fetchThumbnailsForVisibleItems()
+{
+ FUNC_LOG_ADDR(this);
+
+ // No need to do anything if thumbnail fetching is not enabled.
+ if(!VideoThumbnailData::instance().backgroundFetchingEnabled())
+ {
+ return;
+ }
+ HbWidget* content = static_cast<HbWidget*>(this->primitive("content"));
+ HbListView* view(0);
+ if(content)
+ {
+ view = static_cast<HbListView*>(content->primitive("list"));
+ if (!view)
+ {
+ return;
+ }
+ }
+
+ const QList<HbAbstractViewItem *> itemsVisible = view->visibleItems();
+
+ if(itemsVisible.count() > 0)
+ {
+ int row = itemsVisible.value(0)->modelIndex().row();
+ VideoThumbnailData::instance().startBackgroundFetching(mModel, row);
+ }
+ else
+ {
+ // Nothing visible yet, start from first index.
+ VideoThumbnailData::instance().startBackgroundFetching(mModel, 0);
+ }
+}
+
// End of file
--- a/videocollection/videocollectionview/src/videolistview.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/src/videolistview.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 113.1.15 %
+// Version : %version: mcl_114 %
// INCLUDE FILES
#include <hbinstance.h>
@@ -354,6 +354,15 @@
// can modify the mModelReady flag.
showHint();
updateSubLabel();
+
+ VideoCollectionCommon::TCollectionLevels level = mCurrentList->getLevel();
+
+ if (level == VideoCollectionCommon::ELevelDefaultColl ||
+ level == VideoCollectionCommon::ELevelAlbum ||
+ level == VideoCollectionCommon::ELevelVideos)
+ {
+ updateMenuShowState();
+ }
}
// ---------------------------------------------------------------------------
@@ -585,12 +594,12 @@
// no content label is shown instead.
if (itemCount)
{
- subLabel->setHeading(hbTrId("txt_videos_subtitle_all_videos_l1", itemCount));
+ subLabel->setHeading(hbTrId("txt_videos_subtitle_all_videos_l1").arg( itemCount ) );
}
}
else if (mCurrentList->getLevel() == VideoCollectionCommon::ELevelCategory)
{
- subLabel->setHeading(hbTrId("txt_videos_subtitle_collections_l1", itemCount));
+ subLabel->setHeading(hbTrId("txt_videos_subtitle_collections_l1" ).arg( itemCount) );
}
else
{
@@ -602,6 +611,26 @@
}
// ---------------------------------------------------------------------------
+// updateMenuShowState()
+// ---------------------------------------------------------------------------
+//
+void VideoListView::updateMenuShowState()
+{
+ VideoProxyModelGeneric *model = mCurrentList->getModel();
+
+ if (!model || !model->rowCount())
+ {
+ takeMenu();
+ }
+ else
+ {
+ // ensure that our menu is used
+ HbMenu *ourMenu = mUiLoader->findWidget<HbMenu>(DOCML_NAME_OPTIONS_MENU);
+ setMenu(ourMenu);
+ }
+}
+
+// ---------------------------------------------------------------------------
// activateMainView()
// ---------------------------------------------------------------------------
//
@@ -753,9 +782,17 @@
// the collection view is not empty, so we should hide the hint in advance.
showHint(false);
-
+
// also update the sublabel immediatelly, as the data is up to date almost always.
updateSubLabel();
+
+ // collection view has always some actions in menu -> ensure that our menu is set
+ HbMenu *ourMenu = mUiLoader->findWidget<HbMenu>(DOCML_NAME_OPTIONS_MENU);
+ if (menu() != ourMenu)
+ {
+ setMenu(ourMenu);
+ }
+
}
}
--- a/videocollection/videocollectionview/src/videooperatorservice_p.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/src/videooperatorservice_p.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -18,10 +18,10 @@
// Version :
// INCLUDE FILES
+#include "videocollectiontrace.h"
#include "videooperatorservice_p.h"
#include "videocollectionviewutils.h"
#include "videocollectioncenrepdefs.h"
-#include "videocollectiontrace.h"
#include <qdesktopservices.h>
#include <qurl.h>
@@ -30,13 +30,15 @@
#include <apgcli.h>
#include <apaid.h>
#include <apgtask.h>
+#include <xqappmgr.h>
// ---------------------------------------------------------------------------
// Constructor
// ---------------------------------------------------------------------------
//
VideoOperatorServicePrivate::VideoOperatorServicePrivate() :
- mProcess(0)
+ mProcess(0),
+ mAppMgr(0)
{
}
@@ -57,6 +59,9 @@
mProcess->close();
}
delete mProcess;
+ mProcess = 0;
+ delete mAppMgr;
+ mAppMgr = 0;
}
// ---------------------------------------------------------------------------
@@ -111,7 +116,7 @@
if(!mServiceUri.isEmpty())
{
INFOQSTR_1("VideoOperatorServicePrivate::launchService() starting url: %S", mServiceUri);
- QDesktopServices::openUrl(QUrl(mServiceUri));
+ launchUrl(mServiceUri);
}
else
{
@@ -222,6 +227,41 @@
}
// ---------------------------------------------------------------------------
+// launchUrl
+// ---------------------------------------------------------------------------
+//
+void VideoOperatorServicePrivate::launchUrl(QString url)
+{
+ if(!mAppMgr)
+ {
+ mAppMgr = new XQApplicationManager();
+ }
+
+ XQAiwRequest *request = mAppMgr->create(QUrl(url));
+ if(!request)
+ {
+ INFO("VideoOperatorServicePrivate::launchUrl() handler was not found!");
+ return;
+ }
+
+ // Set function parameters
+ QList<QVariant> args;
+ args << url;
+ request->setArguments(args);
+ request->setEmbedded(true);
+ // Send the request
+ bool res = request->send();
+ if(!res)
+ {
+ // Request failed.
+ int error = request->lastError();
+ INFO_1("VideoOperatorServicePrivate::launchUrl() send failed with error: %d", error);
+ }
+
+ delete request;
+}
+
+// ---------------------------------------------------------------------------
// processFinished
// ---------------------------------------------------------------------------
//
--- a/videocollection/videocollectionview/tsrc/testcollectionview/testcollectionview.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testcollectionview/testcollectionview.pro Fri Oct 15 16:29:10 2010 +0300
@@ -48,3 +48,6 @@
include(../../../tsrc/stubs/stubs.pro)
RESOURCES += ../../data/videocollectionview.qrc
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testlistmenu/testlistmenu.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testlistmenu/testlistmenu.pro Fri Oct 15 16:29:10 2010 +0300
@@ -43,4 +43,7 @@
TESTEDCLASS = videolistmenu
include(../../../tsrc/stubs/stubs.pro)
-RESOURCES += ../../data/videocollectionview.qrc
+RESOURCES += ../../data/videocollectionview.qrc
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testlisttoolbar/testlisttoolbar.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testlisttoolbar/testlisttoolbar.pro Fri Oct 15 16:29:10 2010 +0300
@@ -44,3 +44,6 @@
include(../../../tsrc/stubs/stubs.pro)
RESOURCES += ../../data/videocollectionview.qrc
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testlistview/testlistview.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testlistview/testlistview.pro Fri Oct 15 16:29:10 2010 +0300
@@ -45,3 +45,6 @@
include(../../../tsrc/stubs/stubs.pro)
RESOURCES += ../../data/videocollectionview.qrc
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testlistwidget/testlistwidget.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testlistwidget/testlistwidget.pro Fri Oct 15 16:29:10 2010 +0300
@@ -57,4 +57,6 @@
RESOURCES += ../../data/videocollectionview.qrc
-
\ No newline at end of file
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testvideocollectionuiloader/testvideocollectionuiloader.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideocollectionuiloader/testvideocollectionuiloader.pro Fri Oct 15 16:29:10 2010 +0300
@@ -59,3 +59,6 @@
include(../../../tsrc/stubs/stubs.pro)
RESOURCES += ../../data/videocollectionview.qrc
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testvideocollectionviewutils/testvideocollectionviewutils.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideocollectionviewutils/testvideocollectionviewutils.pro Fri Oct 15 16:29:10 2010 +0300
@@ -53,3 +53,6 @@
include(../../../tsrc/stubs/stubs.pro)
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/inc/testvideolistselectiondialog.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/inc/testvideolistselectiondialog.h Fri Oct 15 16:29:10 2010 +0300
@@ -91,31 +91,16 @@
void testFinishedSlot();
/**
- * tests VideoListSelectionDialog::markAllStateChangedSlot
- */
- void testMarkAllStateChangedSlot();
-
- /**
* tests VideoListSelectionDialog::selectionChangedSlot
*/
void testSelectionChangedSlot();
/**
- * tests VideoListSelectionDialog::singleItemSelectedSlot
- */
- void testSingleItemSelectedSlot();
-
- /**
* tests VideoListSelectionDialog::initDialog
*/
void testModelReadySlot();
/**
- * tests VideoListSelectionDialog::updateCounterSlot
- */
- void testUpdateCounterSlot();
-
- /**
* tests VideoListSelectionDialog::primaryActionTriggeredSlot
*/
void testPrimaryActionTriggeredSlot();
@@ -138,11 +123,6 @@
VideoListSelectionDialog *mTestObject;
/**
- * dummy UI loader object
- */
- VideoCollectionUiLoader *mTestUiLoader;
-
- /**
* dummy source model
*/
VideoListDataModel *mSourceModel;
@@ -152,11 +132,6 @@
*/
VideoProxyModelGeneric *mModel;
- /**
- * dummy widget
- */
- VideoListWidget *mTestWidget;
-
/**
* flag indicating if last call to init succeeded.
*/
--- a/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/inc/videolistselectiondialogtester.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/inc/videolistselectiondialogtester.h Fri Oct 15 16:29:10 2010 +0300
@@ -27,11 +27,7 @@
signals:
- void markAllSignal(int);
-
- void selectionChangedSignal(const QItemSelection&, const QItemSelection&);
-
- void singleItemSelectedSignal(const QModelIndex&);
+ void selectionChangedSignal();
void modelReadySignal();
@@ -56,17 +52,7 @@
}
mSignalsConnected = true;
- if(!connect(this, SIGNAL(markAllSignal(int)), mTestable, SLOT(markAllStateChangedSlot(int))))
- {
- return false;
- }
- if(!connect(this, SIGNAL(selectionChangedSignal(const QItemSelection&, const QItemSelection&)),
- mTestable, SLOT(selectionChangedSlot(const QItemSelection&, const QItemSelection&))))
- {
- return false;
- }
- if(!connect(this, SIGNAL(singleItemSelectedSignal(const QModelIndex&)),
- mTestable, SLOT(singleItemSelectedSlot(const QModelIndex&))))
+ if(!connect(this, SIGNAL(selectionChangedSignal()), mTestable, SLOT(selectionChangedSlot())))
{
return false;
}
@@ -74,10 +60,6 @@
{
return false;
}
- if(!connect(this, SIGNAL(updateCounterSignal()), mTestable, SLOT(updateCounterSlot())))
- {
- return false;
- }
if(!connect(this, SIGNAL(primaryActionTriggeredSignal()),
mTestable, SLOT(primaryActionTriggeredSlot())))
{
@@ -95,32 +77,17 @@
if(mTestable && mSignalsConnected)
{
mSignalsConnected = false;
- disconnect(this, SIGNAL(markAllSignal(int)), mTestable, SLOT(markAllStateChangedSlot(int)));
- disconnect(this, SIGNAL(selectionChangedSignal(const QItemSelection&, const QItemSelection&)),
- mTestable, SLOT(selectionChangedSlot(const QItemSelection&, const QItemSelection&)));
- disconnect(this, SIGNAL(singleItemSelectedSignal(const QModelIndex&)),
- mTestable, SLOT(singleItemSelectedSlot(const QModelIndex&)));
+ disconnect(this, SIGNAL(selectionChangedSignal()), mTestable, SLOT(selectionChangedSlot()));
disconnect(this, SIGNAL(modelReadySignal()), mTestable, SLOT(modelReadySlot()));
- disconnect(this, SIGNAL(updateCounterSignal()), mTestable, SLOT(updateCounterSlot()));
disconnect(this, SIGNAL(primaryActionTriggeredSignal()),
mTestable, SLOT(primaryActionTriggeredSlot()));
disconnect(this, SIGNAL(finishedSignal(HbAction*)), mTestable, SLOT(finishedSlot(HbAction*)));
}
}
- void emitMarkAllStateChanged(int state)
- {
- emit markAllSignal(state);
- }
-
- void emitSelectionChangedSlot(const QItemSelection &selected, const QItemSelection &deselected)
+ void emitSelectionChangedSlot()
{
- emit selectionChangedSignal(selected, deselected);
- }
-
- void emitSingleItemSelectedSlot(const QModelIndex &index)
- {
- emit singleItemSelectedSignal(index);
+ emit selectionChangedSignal();
}
void emitModelReadySlot()
@@ -128,11 +95,6 @@
emit modelReadySignal();
}
- void emitUpdateCounterSlot()
- {
- emit updateCounterSignal();
- }
-
void emitPrimaryActionTriggeredSlot()
{
emit primaryActionTriggeredSignal();
--- a/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/src/testvideolistselectiondialog.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/src/testvideolistselectiondialog.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -19,31 +19,24 @@
#include <qapplication.h>
#include "hbview.h"
#include "hbabstractitemview.h"
-#include "hbdocumentloader.h"
-#include "hbstackedwidget.h"
-#include "hbcheckbox.h"
#include "hbinputdialog.h"
-#include "hbdialog.h"
+#include "hbselectiondialog.h"
#include "hbwidget.h"
#include "hblistview.h"
-#include "hbmessagebox.h"
#include "testvideolistselectiondialog.h"
-#include "videocollectionuiloader.h"
#include "videolistdatamodel.h"
#include "videoproxymodelgeneric.h"
-#include "videolistwidget.h"
#include "videocollectionwrapper.h"
#include "videocollectioncommon.h"
#include <vcxmyvideosdefs.h>
#include "videolistdatamodeldata.h"
#include "videocollectionwrapperdata.h"
-#include "videocollectionuiloaderdata.h"
-#include "videolistwidgetdata.h"
#include "videoproxymodeldata.h"
#include "videocollectionviewutilsdata.h"
+#include "videothumbnailtestdata.h"
#define private public
#include "videolistselectiondialogtester.h"
@@ -137,13 +130,10 @@
{
mTestObject = 0;
mModel = 0;
- mTestUiLoader = 0;
- mTestWidget = 0;
mInitOk = false;
- mTestUiLoader = new VideoCollectionUiLoader();
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
mModel = VideoCollectionWrapper::instance().getGenericModel();
mTestHelper->mTestable = mTestObject;
@@ -166,12 +156,11 @@
delete mTestObject;
mTestObject = 0;
- delete mTestUiLoader;
- mTestUiLoader = 0;
-
mSourceModel = 0;
mModel = 0;
+
+ VideoThumbnailTestData::reset();
}
// ---------------------------------------------------------------------------
@@ -193,21 +182,15 @@
// Getting model fails
VideoCollectionWrapperData::mGetGenericModelFails = true;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
QVERIFY(mTestObject->mModel == 0);
- QVERIFY(mTestObject->mListWidget == 0);
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
mTestObject = 0;
- // List widget initialize fails
VideoCollectionWrapperData::mGetGenericModelFails = false;
- VideoListWidgetData::mInitializeReturnValue = -1;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
- QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget == 0);
}
// ---------------------------------------------------------------------------
@@ -217,7 +200,6 @@
void TestVideoListSelectionDialog::testSetupContent()
{
VideoCollectionWrapperData::reset();
- VideoListWidgetData::reset();
QVERIFY(mInitOk == true);
QVERIFY(mModel != 0);
@@ -226,9 +208,7 @@
// invalid type provided, object's internal data will not change
mTestObject->mTypeOfSelection = VideoListSelectionDialog::EDeleteVideos;
- mTestObject->setupContent(-1, mpxId);
- QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
- mTestObject->setupContent(600, mpxId);
+ mTestObject->setupContent(VideoListSelectionDialog::ENoFunction, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
// No data. type EDeleteVideos. Default mpx item
@@ -236,19 +216,11 @@
mpxId = TMPXItemId();
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 1);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -261,19 +233,11 @@
// second setup (for coverity)
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 1);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -284,7 +248,7 @@
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
VideoProxyModelData::reset();
// No data. type ESelectCollection. Default mpx item
@@ -292,19 +256,11 @@
mpxId = TMPXItemId();
mTestObject->setupContent(VideoListSelectionDialog::ESelectCollection, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::ESelectCollection);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 1);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == false);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -315,7 +271,7 @@
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
VideoProxyModelData::reset();
// No data. type EAddToCollection:. Default mpx item
@@ -323,19 +279,11 @@
mpxId = TMPXItemId();
mTestObject->setupContent(VideoListSelectionDialog::EAddToCollection, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EAddToCollection);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 1);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -348,19 +296,11 @@
mpxId = TMPXItemId();
mTestObject->setupContent(VideoListSelectionDialog::ECreateCollection, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::ECreateCollection);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 1);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -371,7 +311,7 @@
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
VideoProxyModelData::reset();
// No data. type ERemoveFromCollection:. Default mpx item
@@ -379,19 +319,11 @@
mpxId = TMPXItemId();
mTestObject->setupContent(VideoListSelectionDialog::ERemoveFromCollection, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::ERemoveFromCollection);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 1);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -402,7 +334,7 @@
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
VideoProxyModelData::reset();
// Some data, mpx item type is album
@@ -410,19 +342,11 @@
mpxId = TMPXItemId(0, KVcxMvcMediaTypeAlbum);
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 0);
QVERIFY(mTestObject->mSelectedAlbumId == mpxId);
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -433,26 +357,18 @@
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
VideoProxyModelData::reset();
// Some data, mpx item type is invalid: category
mpxId = TMPXItemId(0, KVcxMvcMediaTypeCategory);
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 0);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -463,26 +379,18 @@
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
VideoProxyModelData::reset();
// Some data, mpx item type is invalid id
mpxId = TMPXItemId::InvalidId();
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 0);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -492,25 +400,14 @@
VideoProxyModelData::reset();
// some data, second initialization without widget and model, for coverity
- delete mTestObject->mListWidget;
- mTestObject->mListWidget = 0;
mTestObject->mModel = 0;
- mTestObject->mListContainer = 0;
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EDeleteVideos);
- QCOMPARE(mTestObject->mSelection.count(), 0);
QCOMPARE(mTestObject->mSelectedVideos.count(), 0);
QVERIFY(mTestObject->mSelectedAlbumId == TMPXItemId::InvalidId());
QVERIFY(mTestObject->mNewAlbumText.isNull());
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer != 0);
- QVERIFY(mTestObject->mListContainer->mCurrentWidget == mTestObject->mListWidget);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mCheckboxContainer->isVisible() == true);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
+ QVERIFY(mTestObject->mScrollPositionTimer != 0);
QVERIFY(mTestObject->mPrimaryAction != 0);
QVERIFY(mTestObject->mSecondaryAction != 0);
QVERIFY(VideoProxyModelData::mGenericFilterId == mpxId);
@@ -530,28 +427,22 @@
// initDialog fails because model get fails.
QVERIFY(mTestObject->mModel != 0);
VideoProxyModelGeneric *backup = mTestObject->mModel;
- VideoListWidget *backupWidget = mTestObject->mListWidget;
mTestObject->mModel = 0;
- mTestObject->mListWidget = 0;
VideoCollectionWrapperData::mGetGenericModelFails = true;
mpxId = TMPXItemId(0, KVcxMvcMediaTypeVideo);
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
VideoCollectionWrapperData::mGetGenericModelFails = false;
QVERIFY(mTestObject->mModel == 0);
- QVERIFY(mTestObject->mListWidget == 0);
- QVERIFY(mTestObject->mListContainer == 0);
- QVERIFY(mTestObject->mHeading == 0);
- QVERIFY(mTestObject->mCheckboxContainer == 0);
- QVERIFY(mTestObject->mItemCount == 0);
- QVERIFY(mTestObject->mCheckBox == 0);
+ QVERIFY(mTestObject->mScrollPositionTimer == 0);
mTestObject->mModel = backup; backup = 0;
- mTestObject->mListWidget = backupWidget; backupWidget = 0;
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
+ mTestObject = new VideoListSelectionDialog();
+ /*
+ * TODO
// initDialog fails because mListWidget::initialize
QVERIFY(mTestObject->mModel != 0);
VideoListWidgetData::mInitializeReturnValue = -1;
@@ -560,33 +451,14 @@
mpxId = TMPXItemId(0, KVcxMvcMediaTypeVideo);
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget == 0);
- QVERIFY(mTestObject->mListContainer == 0);
- QVERIFY(mTestObject->mHeading == 0);
- QVERIFY(mTestObject->mCheckboxContainer == 0);
- QVERIFY(mTestObject->mItemCount == 0);
- QVERIFY(mTestObject->mCheckBox == 0);
+ QVERIFY(mTestObject->mScrollPositionTimer == 0);
VideoListWidgetData::mInitializeReturnValue = 0;
if(mTestHelper)
mTestHelper->disconnectSignals();
delete mTestObject;
- mTestObject = new VideoListSelectionDialog(mTestUiLoader);
-
- // initdialog fails because DOCML_NAME_LIST_CONTAINER finding fails
- VideoCollectionUiLoaderData::mFindFailure = false;
- VideoCollectionUiLoaderData::mFindFailureNameList.clear();
- VideoCollectionUiLoaderData::mFindFailureNameList.append(DOCML_NAME_LIST_CONTAINER);
- mpxId = TMPXItemId(0, KVcxMvcMediaTypeVideo);
- mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
- QVERIFY(mTestObject->mModel != 0);
- QVERIFY(mTestObject->mListWidget != 0);
- QVERIFY(mTestObject->mListContainer == 0);
- QVERIFY(mTestObject->mHeading != 0);
- QVERIFY(mTestObject->mCheckboxContainer != 0);
- QVERIFY(mTestObject->mItemCount != 0);
- QVERIFY(mTestObject->mCheckBox != 0);
- VideoCollectionUiLoaderData::mFindFailureNameList.clear();
+ mTestObject = new VideoListSelectionDialog();
+ */
}
// ---------------------------------------------------------------------------
@@ -700,7 +572,7 @@
////////////
// mTypeOfSelection == ESelectCollection
- // mSelectedAlbumId != TMPXItemId::InvalidId())
+ // mSelectedAlbumId != TMPXItemId::InvalidId())
VideoCollectionViewUtilsData::mLastError = -1;
mTestObject->setupContent(VideoListSelectionDialog::ESelectCollection, mpxId);
mTestObject->mSelectedVideos.insert(TMPXItemId(1,0));
@@ -886,63 +758,25 @@
QVERIFY(VideoCollectionViewUtilsData::mLastError == VideoCollectionCommon::statusDeleteInProgress);
// invalid type
- mTestObject->mTypeOfSelection = 500;
+ mTestObject->mTypeOfSelection = VideoListSelectionDialog::ENoFunction;
VideoCollectionViewUtilsData::mLastError = -1;
mTestObject->mSelectedVideos.insert(TMPXItemId(1,0));
mTestObject->mSelectedVideos.insert(TMPXItemId(2,0));
VideoProxyModelData::reset();
mTestObject->exec();
- QVERIFY(mTestObject->mTypeOfSelection == 500);
+ QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::ENoFunction);
QVERIFY(VideoCollectionViewUtilsData::mLastError == -1);
QVERIFY(!VideoProxyModelData::mItemIds.count());
-
}
-void TestVideoListSelectionDialog::testMarkAllStateChangedSlot()
+
+void TestVideoListSelectionDialog::testSelectionChangedSlot()
{
- VideoCollectionWrapperData::reset();
- VideoListWidgetData::reset();
- VideoProxyModelData::reset();
-
mTestHelper->mTestable = mTestObject;
mTestHelper->connectSignals();
- HbListView::mAllSelectedStatus = -1;
-
- // forced check
- mTestObject->mForcedCheck = true;
- mTestHelper->emitMarkAllStateChanged(Qt::Checked);
- mTestObject->mForcedCheck = false;
- QVERIFY(HbListView::mAllSelectedStatus == -1);
-
- // checked
- mTestHelper->emitMarkAllStateChanged(Qt::Checked);
- QVERIFY(HbListView::mAllSelectedStatus == 1);
- HbListView::mAllSelectedStatus = -1;
-
- // unchecked
- mTestHelper->emitMarkAllStateChanged(Qt::Unchecked);
- QVERIFY(HbListView::mAllSelectedStatus == 0);
-
- HbListView::mAllSelectedStatus = -1;
-
- mTestHelper->disconnectSignals();
-
-}
-
-void TestVideoListSelectionDialog::testSelectionChangedSlot()
-{
- QItemSelection selected;
- QItemSelection deselected;
-
- mTestHelper->mTestable = mTestObject;
- mTestHelper->connectSignals();
-
- mTestObject->mSelection.clear();
-
// no primary action
- mTestHelper->emitSelectionChangedSlot(selected, deselected);
- QVERIFY(!mTestObject->mSelection.count());
+ mTestHelper->emitSelectionChangedSlot();
TMPXItemId mpxId = TMPXItemId::InvalidId();
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, TMPXItemId(1,1));
@@ -951,18 +785,21 @@
// select item
mTestObject->mPrimaryAction->setEnabled(false);
- QModelIndex index = mModel->index(0, 0);
- QItemSelectionRange range(mModel->index(0, 0));
- selected.append(range);
- mTestHelper->emitSelectionChangedSlot(selected, deselected);
- QVERIFY(mTestObject->mSelection.count() == 1);
+ {
+ QModelIndex index = mModel->index(0, 0);
+ QModelIndexList selected;
+ selected.append(index);
+ mTestObject->setSelectedModelIndexes(selected);
+ }
+ mTestHelper->emitSelectionChangedSlot();
QVERIFY(mTestObject->mPrimaryAction->isEnabled() == true);
// deselect item
- selected.clear();
- deselected.append(range);
- mTestHelper->emitSelectionChangedSlot(selected, deselected);
- QVERIFY(mTestObject->mSelection.count() == 0);
+ {
+ QModelIndexList selected;
+ mTestObject->setSelectedModelIndexes(selected);
+ }
+ mTestHelper->emitSelectionChangedSlot();
QVERIFY(mTestObject->mPrimaryAction->isEnabled() == false);
mTestObject->setupContent(VideoListSelectionDialog::ECreateCollection, TMPXItemId::InvalidId());
@@ -970,46 +807,28 @@
QCOMPARE(mTestObject->mPrimaryAction->text(), hbTrId("txt_common_button_ok"));
// select item, type ECreateCollection
- deselected.clear();
- selected.append(range);
- mTestHelper->emitSelectionChangedSlot(selected, deselected);
- QVERIFY(mTestObject->mSelection.count() == 1);
+ {
+ QModelIndex index = mModel->index(0, 0);
+ QModelIndexList selected;
+ selected.append(index);
+ mTestObject->setSelectedModelIndexes(selected);
+ }
+ mTestHelper->emitSelectionChangedSlot();
QVERIFY(mTestObject->mPrimaryAction->isEnabled() == true);
QCOMPARE(mTestObject->mPrimaryAction->text(), hbTrId("txt_common_button_add"));
- // desect item, type ECreateCollection
- selected.clear();
- deselected.append(range);
- mTestHelper->emitSelectionChangedSlot(selected, deselected);
- QVERIFY(mTestObject->mSelection.count() == 0);
+ // deselect item, type ECreateCollection
+ {
+ QModelIndexList selected;
+ mTestObject->setSelectedModelIndexes(selected);
+ }
+ mTestHelper->emitSelectionChangedSlot();
QVERIFY(mTestObject->mPrimaryAction->isEnabled() == true);
QCOMPARE(mTestObject->mPrimaryAction->text(), hbTrId("txt_common_button_ok"));
mTestHelper->disconnectSignals();
}
-void TestVideoListSelectionDialog::testSingleItemSelectedSlot()
-{
- mTestHelper->mTestable = mTestObject;
- mTestHelper->connectSignals();
-
- setRowCount(10);
- TMPXItemId mpxId = TMPXItemId::InvalidId();
- mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
-
- mTestObject->mTypeOfSelection = VideoListSelectionDialog::ESelectCollection;
- mTestHelper->emitSingleItemSelectedSlot(mModel->index(0, 0));
-
- mTestObject->mTypeOfSelection = VideoListSelectionDialog::ESelectCollection;
- QModelIndex invalidIndex;
- mTestHelper->emitSingleItemSelectedSlot(invalidIndex);
-
- mTestObject->mTypeOfSelection = VideoListSelectionDialog::EDeleteVideos;
- mTestHelper->emitSingleItemSelectedSlot(mModel->index(0, 0));
-
- mTestHelper->disconnectSignals();
-}
-
void TestVideoListSelectionDialog::testModelReadySlot()
{
@@ -1053,68 +872,17 @@
// type ECreateCollection, dialog hidden
mTestObject->setupContent(VideoListSelectionDialog::ECreateCollection, TMPXItemId::InvalidId());
mTestObject->hide();
- HbListView::mLatestScrollToIndex = index;
mTestHelper->emitModelReadySlot();
- QCOMPARE(HbListView::mLatestScrollToIndex, index);
// type EDeleteVideos, dialog hidden.
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, TMPXItemId(1,2));
mTestObject->hide();
mTestHelper->emitModelReadySlot();
- QCOMPARE(HbListView::mLatestScrollToIndex, mModel->index(0, 0));
// type EDeleteVideos, dialog visible.
mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, TMPXItemId(1,2));
- HbListView::mLatestScrollToIndex = index;
mTestObject->setVisible(true);
mTestHelper->emitModelReadySlot();
- QCOMPARE(HbListView::mLatestScrollToIndex, index);
-
- mTestHelper->disconnectSignals();
-}
-
-void TestVideoListSelectionDialog::testUpdateCounterSlot()
-{
- mTestHelper->mTestable = mTestObject;
- mTestHelper->connectSignals();
-
- TMPXItemId mpxId = TMPXItemId::InvalidId();
- mTestObject->setupContent(VideoListSelectionDialog::EDeleteVideos, mpxId);
-
- // itemCount is null
- HbLabel *labelBackup = mTestObject->mItemCount;
- mTestObject->mCheckBox->setChecked(true);
- mTestObject->mItemCount = 0;
- mTestHelper->emitUpdateCounterSlot();
- mTestObject->mItemCount = labelBackup;
- QVERIFY(mTestObject->mCheckBox->mChecked == true);
-
- // no items in model
- setRowCount(0);
- mTestObject->mCheckBox->setChecked(true);
- mTestHelper->emitUpdateCounterSlot();
- QVERIFY(mTestObject->mCheckBox->mChecked == false);
-
- // all selected.
- setRowCount(1);
- mTestObject->mCheckBox->setChecked(false);
- QItemSelection selected;
- QItemSelectionRange range(mTestObject->mModel->index(0, 0));
- selected.append(range);
- mTestObject->mSelection.merge(selected, QItemSelectionModel::Select);
- mTestHelper->emitUpdateCounterSlot();
- QVERIFY(mTestObject->mCheckBox->mChecked == true);
-
- // not all selected
- setRowCount(10);
- mTestObject->mCheckBox->setChecked(true);
- selected.clear();
- range = QItemSelectionRange(mModel->index(0, 0));
- selected.append(range);
- mTestObject->mSelection.clear();
- mTestObject->mSelection.merge(selected, QItemSelectionModel::Select);
- mTestHelper->emitUpdateCounterSlot();
- QVERIFY(mTestObject->mCheckBox->mChecked == false);
mTestHelper->disconnectSignals();
}
@@ -1160,7 +928,7 @@
mTestObject->mSelectedAlbumId = TMPXItemId::InvalidId();
mTestObject->mPrimaryAction->mTriggeredCount = 0;
mTestObject->mSecondaryAction->mTriggeredCount = 0;
- mTestObject->mTypeOfSelection = 555;
+ mTestObject->mTypeOfSelection = VideoListSelectionDialog::ENoFunction;
mTestHelper->emitPrimaryActionTriggeredSlot();
QCOMPARE(mTestObject->mPrimaryAction->mTriggeredCount, 0);
QCOMPARE(mTestObject->mSecondaryAction->mTriggeredCount, 0);
@@ -1191,10 +959,10 @@
VideoProxyModelData::mItemIds.append(TMPXItemId(1,2));
// videos selected, other one's type is not video
- QItemSelection selected;
- QItemSelectionRange range(mTestObject->mModel->index(0, 0), mTestObject->mModel->index(1, 0));
- selected.append(range);
- mTestObject->mSelection.merge(selected, QItemSelectionModel::Select);
+ QModelIndexList selected;
+ selected.append(mTestObject->mModel->index(0, 0));
+ selected.append(mTestObject->mModel->index(1, 0));
+ mTestObject->setSelectedModelIndexes(selected);
mTestObject->mPrimaryAction->mTriggeredCount = 0;
mTestObject->mSecondaryAction->mTriggeredCount = 0;
mTestObject->mTypeOfSelection = VideoListSelectionDialog::EAddToCollection;
--- a/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/testvideolistselectiondialog.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/testvideolistselectiondialog.pro Fri Oct 15 16:29:10 2010 +0300
@@ -52,3 +52,6 @@
TESTEDCLASS = videolistselectiondialog
include(../../../tsrc/stubs/stubs.pro)
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice/testvideooperatorservice.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideooperatorservice/testvideooperatorservice.pro Fri Oct 15 16:29:10 2010 +0300
@@ -60,3 +60,6 @@
TESTEDCLASS = videooperatorservice
include(../../../tsrc/stubs/stubs.pro)
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/inc/testvideooperatorservice_p.h Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/inc/testvideooperatorservice_p.h Fri Oct 15 16:29:10 2010 +0300
@@ -48,6 +48,7 @@
void testIconResource();
void testLaunchService();
void testSlots();
+ void testLaunchUrl();
signals:
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/src/testvideooperatorservice_p.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/src/testvideooperatorservice_p.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -21,6 +21,12 @@
#include <hbinstance.h>
#include <qdebug.h>
+#include "apaidstub.h"
+#include "apgclistub.h"
+#include "apgtaskstub.h"
+#include "coemainstub.h"
+#include "xqappmgrstub.h"
+#include "xqaiwrequeststub.h"
#include "testvideooperatorservice_p.h"
#include "videocollectionviewutilsdata.h"
@@ -76,6 +82,8 @@
TApaTask::mBringToForegroundCallcount = 0;
RApaLsSession::mGetAppInfoCallCount = 0;
TApaAppInfo::mConstructCount = 0;
+ XQApplicationManager::reset();
+ XQAiwRequest::reset();
// create test object
if (!mTestObject)
@@ -172,6 +180,7 @@
{
// Good case.
init();
+ mTestObject->mServiceUri = "";
mTestObject->mApplicationUid = 123456;
RApaLsSession::mFileName.Copy(_L("test.exe"));
mTestObject->launchService();
@@ -247,4 +256,45 @@
cleanup();
}
+// ---------------------------------------------------------------------------
+// testLaunchUrl
+// ---------------------------------------------------------------------------
+//
+void TestVideoOperatorServicePrivate::testLaunchUrl()
+{
+ // First and second call, should succeed
+ init();
+ mTestObject->mServiceUri = "test";
+ mTestObject->launchService();
+ QCOMPARE(XQAiwRequest::mSendCallCount, 1);
+ mTestObject->launchService();
+ QCOMPARE(XQAiwRequest::mSendCallCount, 2);
+ cleanup();
+
+ // Request create fails.
+ init();
+ XQApplicationManager::mCreateFails = true;
+ mTestObject->mServiceUri = "test";
+ mTestObject->launchService();
+ QCOMPARE(XQApplicationManager::mCreateCallCount, 1);
+ QCOMPARE(XQAiwRequest::mSetArgumentsCallCount, 0);
+ QCOMPARE(XQAiwRequest::mSendCallCount, 0);
+ QCOMPARE(XQAiwRequest::mSetEmbeddedCallCount, 0);
+ QCOMPARE(XQAiwRequest::mLastErrorCallCount, 0);
+ cleanup();
+
+ // Request send fails.
+ init();
+ XQAiwRequest::mSendFails = true;
+ mTestObject->mServiceUri = "test";
+ XQAiwRequest::mLastErrorReturnValue = 111;
+ mTestObject->launchService();
+ QCOMPARE(XQApplicationManager::mCreateCallCount, 1);
+ QCOMPARE(XQAiwRequest::mSetArgumentsCallCount, 1);
+ QCOMPARE(XQAiwRequest::mSendCallCount, 1);
+ QCOMPARE(XQAiwRequest::mSetEmbeddedCallCount, 1);
+ QCOMPARE(XQAiwRequest::mLastErrorCallCount, 1);
+ cleanup();
+}
+
// end of file
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/inc/apaidstub.h Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* 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 __APAID_H__
-#define __APAID_H__
-
-#include <e32base.h>
-#include <apadef.h>
-
-class TApaAppInfo
- {
-public:
- TApaAppInfo() { mConstructCount++; iFullName.Copy(_L("")); }
-public:
- /** The full path name of the application DLL. */
- TFileName iFullName;
-
- static TInt mConstructCount;
- };
-
-#endif
-
-// EOF
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/inc/apgclistub.h Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* 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 __APGCLI_H__
-#define __APGCLI_H__
-
-#include <e32base.h>
-#include "apaidstub.h"
-
-class RApaLsSession : public RSessionBase
- {
-public:
-
-public:
- RApaLsSession() {}
-
- TInt GetAppInfo(TApaAppInfo& aInfo, TUid /*aAppUid*/) const
- {
- aInfo.iFullName = mFileName;
- mGetAppInfoCallCount++;
- return 0;
- }
-
- TInt Connect() { return 0; }
- void Close() {}
-
- static TFileName mFileName;
- static TInt mGetAppInfoCallCount;
- };
-
-#endif // __APGCLI_H__
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/inc/apgtaskstub.h Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* 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 __APGTASK_H__
-#define __APGTASK_H__
-
-#include "coemainstub.h"
-#include <e32base.h>
-
-class TApaTask
-{
-public:
- TApaTask(RWsSession& /*aWsSession*/) {}
-
- TBool Exists() const { return mExistsReturnValue; }
- void BringToForeground() { mBringToForegroundCallcount++; }
-
- static bool mExistsReturnValue;
- static int mExistsCallCount;
- static int mBringToForegroundCallcount;
-};
-
-class TApaTaskList
-{
-public:
- TApaTaskList(RWsSession& /*aWsSession*/) {}
- TApaTask FindApp(TUid /*aAppUid*/) { mFindAppCallCount++; return TApaTask(CCoeEnv::mSession); }
-
- static int mFindAppCallCount;
-};
-
-#endif
-
-// End of file
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/inc/coemainstub.h Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* 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 __COEMAIN_H__
-#define __COEMAIN_H__
-
-typedef int RWsSession;
-
-#include <e32base.h>
-
-class CCoeEnv;
-
-extern CCoeEnv *g_Env;
-
-class CCoeEnv
-{
-public:
-
- static CCoeEnv* Static()
- {
- if(mStaticReturnsNull)
- return 0;
- if(!g_Env)
- g_Env = new (ELeave) CCoeEnv;
- return g_Env;
- }
-
- /**
- * Must be called before test exits if it has called the static method.
- */
- static void Reset() { delete g_Env; g_Env = 0; }
-
- RWsSession &WsSession() { return mSession; }
-
- // Construction and destruction
- CCoeEnv() { }
- ~CCoeEnv() {}
-
- static int mCCoeEnvCallCount;
- static RWsSession mSession;
- static bool mStaticReturnsNull;
-};
-
-#endif
-
-// End of file.
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/inc/videocollectiontrace.h Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* 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: tracing stub used to get stubs included first
-*
-*/
-
-#ifndef VIDEOCOLLETIONTRACE_H
-#define VIDEOCOLLETIONTRACE_H
-
-#include "apaidstub.h"
-#include "apgclistub.h"
-#include "coemainstub.h"
-#include "apgtaskstub.h"
-
-#define ERROR( aErr, aMsg )
-#define ERROR_1( aErr, aMsg, aP1 )
-#define ERROR_2( aErr, aMsg, aP1, aP2 )
-#define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )
-#define ERROR_GEN( aMsg )
-#define ERROR_GEN_1( aMsg, aP1 )
-#define ERROR_GEN_2( aMsg, aP1, aP2 )
-#define ERROR_GEN_3( aMsg, aP1, aP2, aP3 )
-
-#define ERROR_PARAM(_p)
-
-#define TRAPD_ERR( aErr, aStmt ) TRAP_IGNORE( aStmt )
-#define TRAP_ERR( aErr, aStmt ) TRAP_IGNORE( aStmt )
-
-#define TRAP_AND_LEAVE(_s,_t) { _s; }
-
-
-#define INFO( aMsg )
-#define INFO_1( aMsg, aP1 )
-#define INFO_2( aMsg, aP1, aP2 )
-#define INFO_3( aMsg, aP1, aP2, aP3 )
-#define INFO_4( aMsg, aP1, aP2, aP3, aP4 )
-#define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
-#define INFO_PARAM( aParam )
-#define INFOQSTR_1( aMsg, aP1 );
-#define INFOQSTR_2( aMsg, aP1, aP2 );
-
-
-#define CURRENT_CLIENT( aMsg )
-#define CLIENT( aRMessage2 )
-#define CLIENT_1( aRMessage2, aMsg )
-
-
-#define HEAP( aMsg )
-#define HEAP_1( aMsg, aP1 )
-#define HEAP_2( aMsg, aP1, aP2 )
-#define HEAP_3( aMsg, aP1, aP2, aP3 )
-#define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )
-
-#define FUNC_LOG
-#define FUNC_LOG_ADDR(P1)
-#define FUNC_LOG_LC( ptr )
-#define FUNC_LOG_WITH_CLIENT
-#define FUNC_LOG_WITH_CLIENT_LC( ptr )
-
-#define TIMESTAMP( aCaption )
-#define TIMESTAMP_1( aCaption, aP1 )
-#define TIMESTAMP_2( aCaption, aP1, aP2 )
-#define TIMESTAMP_3( aCaption, aP1, aP2, aP3 )
-
-
-#define ASSERT_ALWAYS_TRACE
-#define ASSERT_TRACE( _s )
-
-#endif // VIDEOCOLLETIONTRACE_H
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/src/apaidstub.cpp Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* 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 "apaidstub.h"
-
-TInt TApaAppInfo::mConstructCount = 0;
-
-// EOF
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/src/apgclistub.cpp Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* 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 "apgclistub.h"
-
-TFileName RApaLsSession::mFileName = TFileName();
-TInt RApaLsSession::mGetAppInfoCallCount = 0;
-
-// EOF
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/src/apgtask.cpp Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* 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 "apgtaskstub.h"
-
-bool TApaTask::mExistsReturnValue = true;
-int TApaTask::mExistsCallCount = 0;
-int TApaTask::mBringToForegroundCallcount = 0;
-int TApaTaskList::mFindAppCallCount = 0;
-
-// End of file.
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/stub/src/coemain.cpp Tue Oct 05 09:26:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* 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 "coemainstub.h"
-
-int CCoeEnv::mCCoeEnvCallCount = 0;
-bool CCoeEnv::mStaticReturnsNull = false;
-RWsSession CCoeEnv::mSession = 0;
-
-CCoeEnv *g_Env;
-
-// End of file.
--- a/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/testvideooperatorservice_p.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideooperatorservice_p/testvideooperatorservice_p.pro Fri Oct 15 16:29:10 2010 +0300
@@ -22,14 +22,11 @@
DEPENDPATH += . \
inc \
src \
- ../../../tsrc/stubs \
- stub/inc \
- stub/src
+ ../../../tsrc/stubs
INCLUDEPATH += . \
inc \
../../../tsrc/stubs/inc \
- stub/inc \
\ # keep these at bottom so that stub headers are taken first
../../../inc \
../../../videocollectionview/inc \
@@ -53,21 +50,15 @@
-lws32 \
-lcone
-HEADERS += stub/inc/apaidstub.h \
- stub/inc/apgclistub.h \
- stub/inc/videocollectiontrace.h \
- stub/inc/apgtaskstub.h \
- stub/inc/coemainstub.h \
- inc/testvideooperatorservice_p.h \
- ../../../videocollectionview/inc/videooperatorservice_p.h \
+HEADERS += inc/testvideooperatorservice_p.h \
+ ../../../videocollectionview/inc/videooperatorservice_p.h
SOURCES += src/testvideooperatorservice_p.cpp \
\ # sources needed in test
- ../../../videocollectionview/src/videooperatorservice_p.cpp \
- stub/src/apaidstub.cpp \
- stub/src/apgclistub.cpp \
- stub/src/apgtask.cpp \
- stub/src/coemain.cpp
+ ../../../videocollectionview/src/videooperatorservice_p.cpp
TESTEDCLASS = videooperatorservice_p
include(../../../tsrc/stubs/stubs.pro)
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionview/tsrc/videocollectionviewtests.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/videocollectionviewtests.pro Fri Oct 15 16:29:10 2010 +0300
@@ -28,4 +28,4 @@
SUBDIRS += testvideocollectionviewutils
SUBDIRS += testvideolistselectiondialog
SUBDIRS += testvideooperatorservice
-SUBDIRS += testvideooperatorservice_p
\ No newline at end of file
+SUBDIRS += testvideooperatorservice_p
--- a/videocollection/videocollectionview/videocollectionview.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/videocollectionview.pro Fri Oct 15 16:29:10 2010 +0300
@@ -90,7 +90,8 @@
-lws32 \
-lapparc \
-lapgrfx \
- -lcone
+ -lcone \
+ -lxqservice.dll
symbian: {
# Seems to be no way to get these on top of file
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionclient/testvideocollectionclient.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionclient/testvideocollectionclient.pro Fri Oct 15 16:29:10 2010 +0300
@@ -67,3 +67,6 @@
stub/src/mpxcollectionpath.cpp \
stub/src/videocollectionlistener.cpp \
../../src/videocollectionclient.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/testvideocollectionlistener.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/testvideocollectionlistener.pro Fri Oct 15 16:29:10 2010 +0300
@@ -60,3 +60,6 @@
stub/src/stubsignalreceiver.cpp \
../../src/videocollectionutils.cpp \
../../src/videocollectionlistener.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionwrapper_p/testvideocollectionwrapper_p.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionwrapper_p/testvideocollectionwrapper_p.pro Fri Oct 15 16:29:10 2010 +0300
@@ -52,3 +52,6 @@
stub/src/videoproxymodelcontent.cpp \
stub/src/videolistdatamodel.cpp \
../../src/videocollectionwrapper_p.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideodatacontainer/testvideodatacontainer.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideodatacontainer/testvideodatacontainer.pro Fri Oct 15 16:29:10 2010 +0300
@@ -47,3 +47,6 @@
../../src/videodatacontainer.cpp \
src/testvideodatacontainer.cpp \
src/mediaobjectfactory.cpp \
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideodeleteworker/testvideodeleteworker.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideodeleteworker/testvideodeleteworker.pro Fri Oct 15 16:29:10 2010 +0300
@@ -45,3 +45,6 @@
SOURCES += src/testvideodeleteworker.cpp \
../../src/videodeleteworker.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel/testvideomodel.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel/testvideomodel.pro Fri Oct 15 16:29:10 2010 +0300
@@ -62,3 +62,6 @@
RESOURCES += data/testvideolistdatamodel.qrc
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/testvideomodel_p.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/testvideomodel_p.pro Fri Oct 15 16:29:10 2010 +0300
@@ -58,3 +58,6 @@
src/testvideomodel_p.cpp \
src/mediaobjectfactory.cpp \
stub/src/videothumbnaildata.cpp \
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelallvideos/testvideoproxymodelallvideos.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelallvideos/testvideoproxymodelallvideos.pro Fri Oct 15 16:29:10 2010 +0300
@@ -55,3 +55,6 @@
stub/src/videoproxymodelgeneric.cpp \
stub/src/videolistdatamodel.cpp \
../../src/videoproxymodelallvideos.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelcollections/testvideoproxymodelcollections.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelcollections/testvideoproxymodelcollections.pro Fri Oct 15 16:29:10 2010 +0300
@@ -55,3 +55,6 @@
stub/src/videoproxymodelgeneric.cpp \
stub/src/videolistdatamodel.cpp \
../../src/videoproxymodelcollections.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelcontent/testvideoproxymodelcontent.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelcontent/testvideoproxymodelcontent.pro Fri Oct 15 16:29:10 2010 +0300
@@ -55,3 +55,6 @@
stub/src/videoproxymodelgeneric.cpp \
stub/src/videolistdatamodel.cpp \
../../src/videoproxymodelcontent.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelgeneric/testvideoproxymodelgeneric.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideoproxymodelgeneric/testvideoproxymodelgeneric.pro Fri Oct 15 16:29:10 2010 +0300
@@ -54,3 +54,6 @@
stub/src/videocollectionclient.cpp \
stub/src/videothumbnaildata.cpp \
../../src/videoproxymodelgeneric.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideothumbnaildata/testvideothumbnaildata.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideothumbnaildata/testvideothumbnaildata.pro Fri Oct 15 16:29:10 2010 +0300
@@ -56,3 +56,6 @@
SOURCES += src/testvideothumbnaildata.cpp \
stub/src/videothumbnaildata_p.cpp \
../../src/videothumbnaildata.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideothumbnaildata_p/testvideothumbnaildata_p.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideothumbnaildata_p/testvideothumbnaildata_p.pro Fri Oct 15 16:29:10 2010 +0300
@@ -65,3 +65,6 @@
stub/src/videocollectionwrapper.cpp \
stub/src/videoproxymodelgeneric.cpp \
../../src/videothumbnaildata_p.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videocollectionwrapper/tsrc/testvideothumbnailfetcher/testvideothumbnailfetcher.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideothumbnailfetcher/testvideothumbnailfetcher.pro Fri Oct 15 16:29:10 2010 +0300
@@ -56,3 +56,6 @@
src/videothumbnailfetchertester.cpp \
stub/src/thumbnailmanager_qt.cpp \
../../src/videothumbnailfetcher.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videocollection/videofiledetailsview/tsrc/testplugin/testvideofiledetailsviewplugin.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videofiledetailsview/tsrc/testplugin/testvideofiledetailsviewplugin.pro Fri Oct 15 16:29:10 2010 +0300
@@ -77,3 +77,6 @@
RESOURCES += ../../data/videofiledetails.qrc
TARGET.CAPABILITY = All \
-Tcb
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp Fri Oct 15 16:29:10 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 12 %
+// Version : %version: 13 %
@@ -93,3 +93,6 @@
LIBRARY fbscli.lib
// End of File
+
+
+SMPSAFE
--- a/videoplayback/videoplaybackview/controlsrc/videoplaybackcontrolscontroller.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/controlsrc/videoplaybackcontrolscontroller.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: da1mmcf#57 %
+// Version : %version: da1mmcf#58 %
@@ -29,6 +29,7 @@
#include <thumbnailmanager_qt.h>
#include <hblabel.h>
+#include <hbstackedlayout.h>
#include <hbtransparentwindow.h>
#include <hbiconanimationmanager.h>
#include <shareui.h>
@@ -663,8 +664,9 @@
bool ok = true;
QGraphicsWidget *widget = mLoader->findWidget( QString( "bitmapLayout" ) );
+ HbStackedLayout *layout = static_cast<HbStackedLayout*>( widget->layout() );
- if ( widget == NULL )
+ if ( widget == NULL || layout == NULL )
{
mLoader->load( KPLAYBACKVIEW_DOCML, "IndicatorBitmaps", &ok );
widget = mLoader->findWidget( QString( "bitmapLayout" ) );
--- a/videoplayback/videoplaybackview/resources/videoplaybackview.docml Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/resources/videoplaybackview.docml Fri Oct 15 16:29:10 2010 +0300
@@ -3,6 +3,7 @@
<widget name="content" type="HbWidget">
<widget name="bufferingIcon" type="HbLabel"/>
<widget name="rnLogoBitmap" type="HbLabel"/>
+ <widget name="bitmapLayout" type="HbWidget"/>
<widget name="titleLayout" type="HbWidget">
<widget name="title" type="HbLabel">
<enums name="alignment" value="AlignLeft|AlignVCenter|AlignLeading"/>
@@ -133,6 +134,10 @@
<anchoritem dst="fileDetailsLayout" dstEdge="TOP" spacing="0un" src="titleLayout" srcEdge="BOTTOM"/>
<anchoritem dst="fileDetailsLayout" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="fileDetailsLayout" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="bitmapLayout" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="bitmapLayout" dstEdge="TOP" spacing="0un" src="titleLayout" srcEdge="TOP"/>
+ <anchoritem dst="bitmapLayout" dstEdge="RIGHT" spacing="0un" src="" srcEdge="CENTERH"/>
+ <anchoritem dst="bitmapLayout" dstEdge="BOTTOM" spacing="0un" src="controlBarLayout" srcEdge="TOP"/>
</layout>
</widget>
<section name="BufferingAnimation">
@@ -192,39 +197,9 @@
<stackitem itemname="tvOutBitmap"/>
</layout>
</widget>
- <layout type="anchor">
- <anchoritem dst="bufferingIcon" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
- <anchoritem dst="bufferingIcon" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
- <anchoritem dst="rnLogoBitmap" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
- <anchoritem dst="rnLogoBitmap" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
- <anchoritem dst="titleLayout" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="titleLayout" dstEdge="TOP" spacing="9.40299un" src="" srcEdge="TOP"/>
- <anchoritem dst="titleLayout" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="titleLayout" dstEdge="BOTTOM" spacing="14.32836un" src="" srcEdge="TOP"/>
- <anchoritem dst="transparentWindow" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="transparentWindow" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="transparentWindow" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="transparentWindow" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="controlBarLayout" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="controlBarLayout" dstEdge="TOP" spacing="-14.92537un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="controlBarLayout" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="controlBarLayout" dstEdge="BOTTOM" spacing="-8.95522un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="detailsPlaybackWindow" dstEdge="TOP" spacing="0un" src="titleLayout" srcEdge="BOTTOM"/>
- <anchoritem dst="detailsPlaybackWindow" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="detailsPlaybackWindow" dstEdge="RIGHT" spacing="0un" src="" srcEdge="CENTERH"/>
- <anchoritem dst="detailsPlaybackWindow" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="bitmapLayout" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="bitmapLayout" dstEdge="TOP" spacing="0un" src="titleLayout" srcEdge="TOP"/>
- <anchoritem dst="bitmapLayout" dstEdge="RIGHT" spacing="0un" src="" srcEdge="CENTERH"/>
- <anchoritem dst="bitmapLayout" dstEdge="BOTTOM" spacing="0un" src="controlBarLayout" srcEdge="TOP"/>
- <anchoritem dst="fileDetailsLayout" dstEdge="LEFT" spacing="0un" src="" srcEdge="CENTERH"/>
- <anchoritem dst="fileDetailsLayout" dstEdge="TOP" spacing="0un" src="titleLayout" srcEdge="BOTTOM"/>
- <anchoritem dst="fileDetailsLayout" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="fileDetailsLayout" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
- </layout>
</widget>
</section>
- <metadata activeUIState="a" display="NHD-3.2-inch_landscape" unit="un">
+ <metadata activeUIState="" display="NHD-3.2-inch_landscape" unit="un">
<resource location="videoplaybackview.qrc"/>
<uistate name="Common ui state" sections="#common"/>
</metadata>
--- a/videoplayback/videoplaybackview/tsrc/testcontrolbar/testcontrolbar.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testcontrolbar/testcontrolbar.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testcontrolbar
#
#
-# Version : %version: 5 %
+# Version : %version: 6 %
TEMPLATE = app
TARGET = testcontrolbar
@@ -41,3 +41,6 @@
videoplaybackprogressbar.cpp \
videoplaybacktoolbar.cpp \
../../controlsrc/videoplaybackcontrolbar.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testcontrolconfiguration/testcontrolconfiguration.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testcontrolconfiguration/testcontrolconfiguration.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testcontrolconfiguration
#
#
-# Version : %version: 3 %
+# Version : %version: 4 %
TEMPLATE = app
@@ -45,3 +45,6 @@
testcontrolconfiguration.cpp \
videoplaybackviewfiledetails.cpp \
videoplaybackcontrolscontroller.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testcontrolpolicy/testcontrolpolicy.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testcontrolpolicy/testcontrolpolicy.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testcontrolpolicy
#
#
-# Version : %version: 2 %
+# Version : %version: 3 %
TEMPLATE = app
TARGET = testcontrolpolicy
@@ -35,3 +35,6 @@
SOURCES += testcontrolpolicy.cpp \
videoplaybackviewfiledetails.cpp \
../../controlsrc/videoplaybackcontrolpolicy.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testcontrolscontroller/testcontrolscontroller.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testcontrolscontroller/testcontrolscontroller.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testcontrolscontroller
#
#
-# Version : %version: 10 %
+# Version : %version: 11 %
TEMPLATE = app
@@ -76,4 +76,6 @@
shareui.cpp \
../../controlsrc/videoplaybackcontrolscontroller.cpp
-
\ No newline at end of file
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testdetailsplaybackwindow/testdetailsplaybackwindow.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testdetailsplaybackwindow/testdetailsplaybackwindow.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testdetailsplaybackwindow
#
#
-# Version : %version: 4 %
+# Version : %version: 5 %
TEMPLATE = app
TARGET = testdetailsplaybackwindow
@@ -41,3 +41,6 @@
videoplaybackviewfiledetails.cpp \
hbpushbutton.cpp \
../../controlsrc/videoplaybackdetailsplaybackwindow.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testdocumentloader/testdocumentloader.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testdocumentloader/testdocumentloader.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testdocumentloader
#
#
-# Version : %version: 7 %
+# Version : %version: 8 %
TEMPLATE = app
TARGET = testdocumentloader
@@ -41,3 +41,6 @@
videoplaybackdetailsplaybackwindow.cpp \
videoplaybackcontrolbar.cpp \
../../controlsrc/videoplaybackdocumentloader.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testfiledetailswidget/testfiledetailswidget.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testfiledetailswidget/testfiledetailswidget.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testfiledetailswidget
#
#
-# Version : %version: 3 %
+# Version : %version: 4 %
TEMPLATE = app
TARGET = testfiledetailswidget
@@ -40,3 +40,6 @@
videoplaybackviewfiledetails.cpp \
hbglobal.cpp \
../../controlsrc/videoplaybackfiledetailswidget.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testfullscreencontrol/testfullscreencontrol.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testfullscreencontrol/testfullscreencontrol.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testfullscreencontrol
#
#
-# Version : %version: 4 %
+# Version : %version: 5 %
TEMPLATE = app
@@ -50,3 +50,6 @@
videoplaybackcontrolbar.cpp \
videoplaybackfiledetailswidget.cpp \
videoplaybackdetailsplaybackwindow.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/testmpxvideoviewwrapper.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/testmpxvideoviewwrapper.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testmpxvideoviewwrapper
#
#
-# Version : %version: 11 %
+# Version : %version: 12 %
TEMPLATE = app
@@ -58,3 +58,6 @@
videoplaybackuserinputhandler.cpp \
devsoundif.cpp \
../../viewsrc/mpxvideoviewwrapper.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testprogressbar/testprogressbar.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testprogressbar/testprogressbar.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testprogressbar
#
#
-# Version : %version: 4 %
+# Version : %version: 5 %
TEMPLATE = app
TARGET = testprogressbar
@@ -43,3 +43,6 @@
hbprogressslider.cpp \
hbglobal.cpp \
../../controlsrc/videoplaybackprogressbar.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/teststatuspanecontrol/teststatuspanecontrol.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/teststatuspanecontrol/teststatuspanecontrol.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building teststatuspanecontrol
#
#
-# Version : %version: 5 %
+# Version : %version: 6 %
TEMPLATE = app
@@ -53,4 +53,6 @@
videoplaybackfullscreencontrol.cpp \
hblabel.cpp \
hbgroupbox.cpp
-
\ No newline at end of file
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testtoolbar/testtoolbar.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testtoolbar/testtoolbar.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testtoolbar
#
#
-# Version : %version: 3 %
+# Version : %version: 4 %
TEMPLATE = app
TARGET = testtoolbar
@@ -47,3 +47,6 @@
hbtoolbar.cpp \
hbtoolbutton.cpp \
../../controlsrc/videoplaybacktoolbar.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testuserinputhandler/testuserinputhandler.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testuserinputhandler/testuserinputhandler.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testuserinputhandler
#
#
-# Version : %version: 6 %
+# Version : %version: 7 %
TEMPLATE = app
TARGET = testuserinputhandler
@@ -47,3 +47,6 @@
stub/src/videoplaybackviewfiledetails.cpp \
src/testuserinputhandler.cpp \
../../viewsrc/videoplaybackuserinputhandler.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testvideodisplayhandler/src/testvideodisplayhandler.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testvideodisplayhandler/src/testvideodisplayhandler.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -150,8 +150,8 @@
{
setup();
- mFileDetails->mVideoHeight = 174;
- mFileDetails->mVideoWidth = 144;
+ mFileDetails->mVideoHeight = 144;
+ mFileDetails->mVideoWidth = 176;
CMPXMessage* message = NULL;
TRAP_IGNORE
@@ -175,6 +175,9 @@
{
setup();
+ mFileDetails->mVideoHeight = 480;
+ mFileDetails->mVideoWidth = 852;
+
CMPXMessage* message = NULL;
TRAP_IGNORE
(
--- a/videoplayback/videoplaybackview/tsrc/testvideodisplayhandler/testvideodisplayhandler.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testvideodisplayhandler/testvideodisplayhandler.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building Videoplayer components
#
#
-# Version : %version: 7 %
+# Version : %version: 8 %
TEMPLATE = app
TARGET = testvideodisplayhandler
@@ -54,3 +54,6 @@
mediaclientvideodisplay.cpp \
testvideodisplayhandler.cpp \
../../viewsrc/videoplaybackdisplayhandler.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testvideoplaybackview/testvideoplaybackview.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testvideoplaybackview/testvideoplaybackview.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building Videoplayer components
#
#
-# Version : %version: ou1cpsw#12 %
+# Version : %version: 13 %
TEMPLATE = app
TARGET = testvideoplaybackview
@@ -55,3 +55,6 @@
hbtapgesture.cpp \
hbpangesture.cpp \
videoactivitystate.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/tsrc/testvolumecontrol/testvolumecontrol.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testvolumecontrol/testvolumecontrol.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building testvolumecontrol
#
#
-# Version : %version: 1 %
+# Version : %version: 2 %
TEMPLATE = app
TARGET = testvolumecontrol
@@ -39,3 +39,6 @@
videoplaybackviewfiledetails.cpp \
hbvolumesliderpopup.cpp \
../../controlsrc/videoplaybackvolumecontrol.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayback/videoplaybackview/viewsrc/videoplaybackdisplayhandler.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackview/viewsrc/videoplaybackdisplayhandler.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 31 %
+// Version : %version: 32 %
#include <sysutil.h>
#include <s32file.h>
@@ -125,6 +125,10 @@
TReal32 height = (TReal32) aDisplayRect.Height();
iDisplayAspectRatio = (width > height)? (width / height) : (height / width);
+ MPX_DEBUG(
+ _L("CVideoPlaybackDisplayHandler::CreateDisplayWindowL() display width=%d, height=%d, ratio=%f"),
+ aDisplayRect.Width(), aDisplayRect.Height(), iDisplayAspectRatio);
+
if ( ! iVideoContainer )
{
iVideoContainer = new ( ELeave ) CVideoContainer();
@@ -244,16 +248,21 @@
TReal32 videoAspectRatio = (TReal32)iFileDetails->mVideoWidth /
(TReal32)iFileDetails->mVideoHeight;
+
+ MPX_DEBUG(
+ _L("CVideoPlaybackDisplayHandler::CalculateAspectRatioL() display width=%d, height=%d, ratio=%f"),
+ iFileDetails->mVideoWidth, iFileDetails->mVideoHeight, videoAspectRatio);
+
//
// If the pixel aspect ratio is valid, use it to modify the videoAspectRatio
//
if ( iAspectRatio.iDenominator )
{
- MPX_DEBUG(_L("VideoPlaybackDisplayHandler::CalculateAspectRatioL() iAspectRatio = (%d,%d)"),
- iAspectRatio.iNumerator, iAspectRatio.iDenominator );
-
TReal32 par = (TReal32)iAspectRatio.iNumerator / (TReal32)iAspectRatio.iDenominator;
videoAspectRatio *= par;
+
+ MPX_DEBUG(_L("VideoPlaybackDisplayHandler::CalculateAspectRatioL() Num=%d, Den=%d, ratio =%f"),
+ iAspectRatio.iNumerator, iAspectRatio.iDenominator, videoAspectRatio );
}
TInt cnt = iAspectRatioArray.Count();
@@ -276,12 +285,12 @@
// if can't find out match aspect ratio in dat file,
// choose the scaling type through the rule
// aspectRatioDiff = videoAspectRatio - iDisplayAspectRatio
- // aspectRatioDiff >= - 0.00001 and <= 0.00001 ==> natural
+ // aspectRatioDiff >= - 0.01 and <= 0.01 ==> natural
// aspectRatioDiff > 0.1 ==> zoom
// aspectRatioDiff < - 0.3 ==> natural
// aspectRatioDiff >= - 0.3 and <= 0.1 ==> stretch
//
- // -0.3 -0.00001 0.00001 0.1
+ // -0.3 -0.01 0.01 0.1
// ------------------------------------------------------------
// Natural | Stretch | Natural | Stretch | Zoom
//
@@ -290,7 +299,7 @@
{
TReal32 aspectRatioDiff = videoAspectRatio - iDisplayAspectRatio;
- MPX_DEBUG(_L("VideoPlaybackDisplayHandler::CalculateAspectRatioL() videoAspectRatio = d,iDisplayAspectRatio = %d)"),
+ MPX_DEBUG(_L("VideoPlaybackDisplayHandler::CalculateAspectRatioL() videoAR=%f, displayAR=%f)"),
videoAspectRatio, iDisplayAspectRatio );
if ( IsAspectRatioEqual( videoAspectRatio, iDisplayAspectRatio ) )
@@ -777,7 +786,7 @@
TBool valuesEqual = EFalse;
TReal32 arDiff = aRatio1 - aRatio2;
- if ( arDiff < 0.00001 && arDiff > -0.00001 )
+ if ( arDiff < 0.01 && arDiff > -0.01 )
{
valuesEqual = ETrue;
}
--- a/videoplayback/videoplaybackviewplugin/tsrc/testvideoplaybackviewplugin/testvideoplaybackviewplugin.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayback/videoplaybackviewplugin/tsrc/testvideoplaybackviewplugin/testvideoplaybackviewplugin.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building Videoplayer components
#
#
-# Version : %version: 6 %
+# Version : %version: 7 %
TEMPLATE = app
@@ -39,3 +39,6 @@
SOURCES += testvideoplaybackviewplugin.cpp \
videoplaybackview.cpp \
../../src/videoplaybackviewplugin.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayerapp/videoplayer/sis/videoplayer_stub.pkg Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayerapp/videoplayer/sis/videoplayer_stub.pkg Fri Oct 15 16:29:10 2010 +0300
@@ -18,7 +18,7 @@
&EN
; SIS header: name, uid, version
-# {"videoplayer"}, (0x200211FE), 10,10,3, TYPE=SA
+# {"videoplayer"}, (0x200211FE), 10,10,4, TYPE=SA
; Localised Vendor name
%{"Nokia"}
--- a/videoplayerapp/videoplayer/sis/videoplayer_udeb.pkg Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayerapp/videoplayer/sis/videoplayer_udeb.pkg Fri Oct 15 16:29:10 2010 +0300
@@ -18,7 +18,7 @@
&EN
; SIS header: name, uid, version
-#{"videoplayer"},(0x200211FE),10,10,3,TYPE=SA, RU
+#{"videoplayer"},(0x200211FE),10,10,4,TYPE=SA, RU
; Localised Vendor name
%{"Nokia"}
--- a/videoplayerapp/videoplayer/sis/videoplayer_urel.pkg Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayerapp/videoplayer/sis/videoplayer_urel.pkg Fri Oct 15 16:29:10 2010 +0300
@@ -18,7 +18,7 @@
&EN
; SIS header: name, uid, version
-#{"videoplayer"},(0x200211FE),10,10,3,TYPE=SA, RU
+#{"videoplayer"},(0x200211FE),10,10,4,TYPE=SA, RU
; Localised Vendor name
%{"Nokia"}
--- a/videoplayerapp/videoplayerengine/tsrc/testvideoappuiengine/testvideoappuiengine.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayerapp/videoplayerengine/tsrc/testvideoappuiengine/testvideoappuiengine.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building Videoplayer components
#
#
-# Version : %version: 5 %
+# Version : %version: 6 %
TEMPLATE = app
@@ -64,3 +64,6 @@
mpxcollectionplaylist.cpp \
videoplaylistutility.cpp \
../../src/mpxvideoplayerappuiengine.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayerapp/videoplayerengine/tsrc/testvideoiadupdatewrapper/testvideoiadupdatewrapper.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayerapp/videoplayerengine/tsrc/testvideoiadupdatewrapper/testvideoiadupdatewrapper.pro Fri Oct 15 16:29:10 2010 +0300
@@ -47,3 +47,6 @@
# stub/src/featmgr.cpp \
src/testvideoiadupdatewrapper.cpp \
../../src/videoiadupdatewrapper.cpp \
+
+
+symbian:MMP_RULES += SMPSAFE
\ No newline at end of file
--- a/videoplayerapp/videoplayerengine/tsrc/testvideoplayerengine/testvideoplayerengine.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayerapp/videoplayerengine/tsrc/testvideoplayerengine/testvideoplayerengine.pro Fri Oct 15 16:29:10 2010 +0300
@@ -14,7 +14,7 @@
# Description: Project file for building Videoplayer components
#
#
-# Version : %version: 17 %
+# Version : %version: da1mmcf#18 %
TEMPLATE = app
@@ -70,3 +70,6 @@
afactivitystorage.cpp \
videoiadupdatewrapper.cpp \
../../src/videoplayerengine.cpp
+
+
+symbian:MMP_RULES += SMPSAFE
--- a/videoplayerapp/videoplayerengine/tsrc/testvideoservices/testvideoservices.pro Tue Oct 05 09:26:49 2010 +0300
+++ b/videoplayerapp/videoplayerengine/tsrc/testvideoservices/testvideoservices.pro Fri Oct 15 16:29:10 2010 +0300
@@ -55,3 +55,6 @@
../../src/videoservicebrowse.cpp \
../../src/videoserviceuri.cpp
+
+
+symbian:MMP_RULES += SMPSAFE