Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to handle URI activation in WinRT

How to handle URI activation in WinRT

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 645 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Sebastian Peterson
    wrote on last edited by John Sebastian Peterson
    #1

    how do i handle OnActivated in my Qt app? https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh779670.aspx

    in the windows sample it's an override

    https://code.msdn.microsoft.com/windowsapps/Association-Launching-535d2cec/sourcecode?fileId=43564&pathId=512958551
    virtual void OnActivated(Windows::ApplicationModel::Activation::IActivatedEventArgs^ e) override;

    in qt it's placed in m_argv but no signal is emitted that i can listen for to handle it

    https://github.com/qtproject/qtbase/blob/dev/src/winmain/qtmain_winrt.cpp#L196
    m_argv.append(qstrdup(arg.constData()));

    there's no reference to https://github.com/qtproject/qtbase/search?utf8=✓&q=ActivationKind%3A%3AProtocol which is neecessary to handle uri activation

    https://code.msdn.microsoft.com/windowsapps/Association-Launching-535d2cec/sourcecode?fileId=43564&pathId=376504347
    if (e->Kind == Windows::ApplicationModel::Activation::ActivationKind::Protocol)

    when running my app with

    start "" "magnet:?xt=urn:btih:3D0E4579BFF79AE7E293DEA26706B4CBACE43CDC"
    

    it's not in my qApp->arguments()

    D:\repo\qbittorrent\winrt\src\debug\qbittorrent.exe
    -ServerName:App.AppXj9ptmnre2c04jk6zsvq8kxtadgtw06mg.mca
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved