×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    104

    Getting two app icons on N9

    Hi,

    I have a weird problem. When I install my application it creates two shortcuts, one is the default Qt shortcut that should be there and one is a red square. Funny thing, when I click the red square icon the app launches, when I click the other icon that is created all I get is a black screen.

    Also, application doesn't appear in application manager under settings until I restart the phone so when I press and hold the screen I don't get the red x thing for uninstall of the application.

    Any ideas on what could be causing this?

    Here's the .pro file:

    Code:
    # When compiling for publishing the app, activate this
    # to change to the 0x2... UID and the right UID for the
    # Smart Installer. Using those UIDs requires a development
    # certificate.
    # For self signed versions, remove / comment the following line.
    #DEFINES += DEPLOY_VERSION #CHANGE UID3 BELOW BEFORE YOU DO A RELEASE!!!!!
    
    TARGET = restthing
    VERSION = 0.10.0
    
    # If your application uses the Qt Mobility libraries, uncomment the following
    # lines and add the respective components to the MOBILITY variable.
    CONFIG += mobility qt-components
    MOBILITY += connectivity systeminfo sensors location
    
    # Define QMLJSDEBUGGER to allow debugging of QML in debug builds
    # (This might significantly increase build time)
    #DEFINES += QMLJSDEBUGGER
    
    QT += sql
    
    # Define for detecting Harmattan in .cpp files.
    # Only needed for experimental / beta Harmattan SDKs.
    # Will be defined by default in the final SDK.
    exists($$QMAKE_INCDIR_QT"/../qmsystem2/qmkeys.h"):!contains(MEEGO_EDITION,harmattan): {
      MEEGO_VERSION_MAJOR     = 1
      MEEGO_VERSION_MINOR     = 2
      MEEGO_VERSION_PATCH     = 0
      MEEGO_EDITION           = harmattan
      DEFINES += MEEGO_EDITION_HARMATTAN
    }
    
    # Additional import path used to resolve QML modules in Creator's code model
    QML_IMPORT_PATH =
    
    OTHER_FILES += \
        qml/images/*.svg \
        qml/images/*.png
    
    # The .cpp file which was generated for your project. Feel free to hack it.
    SOURCES += \
        tdes.cpp \
        nfcpeertopeer.cpp \
        appsettings.cpp \
        restconnector.cpp \
        json.cpp \
        DatabaseManager.cpp \
        orientation.cpp \
        applicationprefs.cpp \
        MD5LittleEndian.cpp \
        restaurantbuffer.cpp \
        main.cpp \
        DES.cpp \
        diversify_key.cpp \
        locationwatcher.cpp \
        SecureStorage.cpp \
        kineticscroller.cpp
    
    HEADERS += \
        nfcpeertopeer.h \
        appsettings.h \
        restconnector.h \
        json.h \
        DatabaseManager.h \
        orientation.h \
        applicationprefs.h \
        MD5LittleEndian.h \
        restaurantbuffer.h \
        tdes.h \
        DES.h \
        diversify_key.h \
        locationwatcher.h \
        SecureStorage.h \
        kineticscroller.h \
        ThreadThing.h
    
    simulator {
        message(Simulator build)
        # The simulator uses the QML and images from Symbian,
        # as it doesn't have support for simulating Qt Quick Components for
        # MeeGo Harmattan.
        OTHER_FILES += \
            qml/symbian/*.qml
    
        qmlFolder.source = qml/symbian/*
        qmlFolder.target = qml
        QML_IMPORT_PATH = qml/symbian
    
        OTHER_FILES += \
            qml/images-symbian/*.qml
        imagesFolderSymbian.source = qml/images-symbian/*
        imagesFolderSymbian.target = qml
        DEPLOYMENTFOLDERS += imagesFolderSymbian
    }
    
    symbian {
        message(Symbian build)
        DEPLOYMENT.display_name = "restthing"
        contains(DEFINES, DEPLOY_VERSION) {
            TARGET.UID3 = 0x2005CE04	#CHANGE ME! CHANGE!!! 
        } else {
            TARGET.UID3 = 0xE101C065
        }
    
        ICON = restthing.svg
    
        TARGET.CAPABILITY += NetworkServices LocalServices Location
    
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x1000 0x1800000 # 24MB
    
        # Smart Installer package's UID
        # This UID is from the protected range and therefore the package will
        # fail to install if self-signed. By default qmake uses the unprotected
        # range value if unprotected UID is defined for the application and
        # 0x2002CCCF value if protected UID is given to the application
        contains(DEFINES,DEPLOY_VERSION) {
            DEPLOYMENT.installer_header = 0x2002CCCF
        }
    
        # add NfcSettings support
        include(nfcsettings/nfcsettings.pri)
    
        OTHER_FILES += \
            qml/symbian/*.qml #\
            #qml/*.*
    
        qmlFolder.source = qml/symbian/*
        qmlFolder.target = qml
        QML_IMPORT_PATH = qml/symbian
    
        # Symbian specific images
        OTHER_FILES += \
            qml/images-symbian/*.qml
        imagesFolderSymbian.source = qml/images-symbian/*
        imagesFolderSymbian.target = qml
        DEPLOYMENTFOLDERS += imagesFolderSymbian
    
        # Autostart
        ndefhandler.sources = ndefhandler_restthing.xml
        ndefhandler.path = c:/private/2002AC7F/import/
        DEPLOYMENT += ndefhandler
    
        # Localisation support.
        CODECFORTR = UTF-8
        TRANSLATIONS += qml/symbian/restthing_sl.ts
    
        translationfiles.source = qml/symbian/*.qm
        DEPLOYMENTFOLDERS += translationfiles
    
        vendorName = "RestTeam"
        vendorinfo = \
            "; Localised Vendor name" \
            "%{$$addLanguageDependentPkgItem(vendorName)}" \
            " " \
            "; Unique Vendor name" \
            ":\"$$vendorName\"" \
            " "
    
        deployment_vendor.pkg_prerules += vendorinfo
        DEPLOYMENT += deployment_vendor
    }
    
    contains(MEEGO_EDITION,harmattan) {
        message(Harmattan build)
        # Temp
        #DEFINES += MEEGO_EDITION_HARMATTAN
    
        # Speed up launching on MeeGo/Harmattan when using applauncherd daemon
        CONFIG += qdeclarative-boostable
    
        OTHER_FILES += qtc_packaging/debian_harmattan/*
    
        OTHER_FILES += \
            qml/meego/*.qml
    
        qmlFolder.source = qml/meego/*
        qmlFolder.target = qml
        QML_IMPORT_PATH = qml/meego
    
        # Don't use nfcinfo_harmattan.desktop. Otherwise,
        # the NDEF Autostart handler won't find the desktop file and
        # will not be able to auto-launch this app on tag-touch.
        # See: https://bugreports.qt.nokia.com/browse/QTMOBILITY-1848
        harmattandesktopfile.files = restthing.desktop
        harmattandesktopfile.path = /usr/share/applications
        INSTALLS += harmattandesktopfile
    
    
        # To avoid conflicts, recommended to name this file according to the
        # full service name instead of just the app name.
        # See: https://bugreports.qt.nokia.com/browse/QTMOBILITY-1848
        ndefhandler_service.files = com.nokia.qtmobility.nfc.restthing.service
        ndefhandler_service.path = /usr/share/dbus-1/services/
        INSTALLS += ndefhandler_service
    
        launchericon.files = restthing80.png splash-restthing-l.png splash-restthing-p.png
        launchericon.path = /opt/restthing/
        INSTALLS += launchericon
    }
    
    imagesFolder.source = qml/images/*
    imagesFolder.target = qml
    DEPLOYMENTFOLDERS += qmlFolder imagesFolder
    
    # Please do not modify the following two lines. Required for deployment.
    include(qmlapplicationviewer/qmlapplicationviewer.pri)
    qtcAddDeployment()

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Getting two app icons on N9

    Hi,

    If you check the qmlapplicationviewer/qmlapplicationviewer.pri file,
    you can see that the icons are being placed in the respective folders as needed for harmattan platform -

    else:!isEmpty(MEEGO_VERSION_MAJOR) {
    desktopfile.files = $${TARGET}_harmattan.desktop
    desktopfile.path = /usr/share/applications
    icon.files = $${TARGET}80.png
    icon.path = /usr/share/icons/hicolor/80x80/apps
    }

    !isEmpty(desktopfile.path) {
    export(icon.files)
    export(icon.path)
    export(desktopfile.files)
    export(desktopfile.path)
    INSTALLS += icon desktopfile
    }

    Since you have added the below lines, the icon deployment is taken care by these files.
    include(qmlapplicationviewer/qmlapplicationviewer.pri)
    qtcAddDeployment()

    The below lines in your .pro file are doing again the same -

    launchericon.files = restthing80.png splash-restthing-l.png splash-restthing-p.png
    launchericon.path = /opt/restthing/
    INSTALLS += launchericon

    This could be the reason for 2 icons. If you would want to cross check with some existing implementation for better understanding,
    you can check this link that has harmattan showcase app source code in .zip/tar.gz archives.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    104

    Re: Getting two app icons on N9

    Well... I tried to comment out those three lines for manual including of icons and nothing changes. I still get the same two icons. One is red square that runs the app and one is default qt icon that shows a black screen.

    Also, I loaded a lot of example apps and no one has that red x thing for uninstalling the application. How do you support uninstalling the application by long press on the application icon?

  4. #4
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Getting two app icons on N9

    libmeegotouch-home takes care of the uninstalling. This is done by framework. i can uninstall my sample apps/examples with the same longpress.

    BTW, did you try cleaning and rebuilding your app for the icon thing. Also did you uninstall the previously installed app, you can do it from application manager, if not from application grid in launcher. Also the icons <app>80.png and <app>.png should be present too.

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    104

    Re: Getting two app icons on N9

    Yes, I tried cleaning and rebuilding. I made a new project and am slowly porting things to it to see what will break the icon things. The long press doesn't work for me for any sample application I tried (nfcchat, diner, RentBook, harmattan showcase app, new project created with qt creator), it works for SDK Connectivity application, terminal and the games that come with the phone though.

    Ahh yes, and the icons <app>80.png and <app>64.png are present also.

Similar Threads

  1. Created icons doesn't showup,Only default icons shown
    By shintu in forum [Archived] Qt Quick
    Replies: 2
    Last Post: 2011-11-06, 15:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×