app/tsrc/unittest_mpmtpinfolink/stub/src/qdesktopservices.cpp
changeset 41 ea59c434026a
equal deleted inserted replaced
32:c163ef0b758d 41:ea59c434026a
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: QDesktopServices stub for testing MpMtpInfoLink.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <QUrl>
       
    19 
       
    20 #include "stub/inc/qdesktopservices.h"
       
    21 
       
    22 
       
    23 /*!
       
    24  Constructs the QDesktopServices.
       
    25  */
       
    26 QDesktopServices::QDesktopServices()
       
    27 {
       
    28     mOpenUrlCount = 0;
       
    29 }
       
    30 
       
    31 /*!
       
    32  Destructs the QDesktopServices.
       
    33  */
       
    34 QDesktopServices::~QDesktopServices()
       
    35 {
       
    36 }
       
    37 
       
    38 /*!
       
    39  Returns the singleton instance to the QDesktopServices.
       
    40  */
       
    41 QDesktopServices * QDesktopServices::instance()
       
    42 {
       
    43     static QDesktopServices instance;
       
    44     return &instance;
       
    45 }
       
    46 
       
    47 bool QDesktopServices::openUrl( const QUrl &url)
       
    48 {
       
    49     Q_UNUSED( url );
       
    50     instance()->mOpenUrlCount++;
       
    51     return true;
       
    52 }
       
    53