Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8187351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:31:57+00:00 2026-06-07T02:31:57+00:00

This is my first time using DBus so I’m not entirely sure if I’m

  • 0

This is my first time using DBus so I’m not entirely sure if I’m going about this the right way. I’m attempting to connect the the Ubuntu One DBus service and obtain login credentials for my app, however the slots I’ve connected to the DBus return signals detailed here never seem to be firing, despite a positive result being returned during the connection.

Before I start looking for errors in the details relating to this specific service, could someone please tell me if this code would even work in the first place, or if I’m done something wrong here?

int main()
{
    UbuntuOneDBus *u1Dbus = new UbuntuOneDBus;
    u1Dbus->init();
}

class UbuntuOneDBus : public QObject
{
  Q_OBJECT

  QString busName;
  QString path;
  QString interface;
  QString method;
  QString signature;

  void connectReturnSignals();

private slots:
  void credentialsFound();
  void credentialsNotFound();
  void credentialsError();

public:
  UbuntuOneDBus();

  void init();
};

UbuntuOneDBus::UbuntuOneDBus()
{
  busName = "com.ubuntuone.Credentials";
  path = "/credentials";
  interface = "com.ubuntuone.CredentialsManagement";
  method = "register";
  signature = "a{ss}";

  connectReturnSignals();
}

void UbuntuOneDBus::init()
{
  QDBusMessage message = QDBusMessage::createMethodCall( busName, path, interface, method );
  QDBusConnection::sessionBus().send( message );
}

void UbuntuOneDBus::connectReturnSignals()
{
  QDBusConnection::sessionBus().connect( busName, path, interface, "CredentialsFound", this, SLOT( credentialsFound() ) );
  QDBusConnection::sessionBus().connect( busName, path, interface, "CredentialsNotFound", this, SLOT( credentialsNotFound() ) );
  QDBusConnection::sessionBus().connect( busName, path, interface, "CredentialsError", this, SLOT( credentialsError() ) );
}

void UbuntuOneDBus::credentialsFound()
{
  qDebug() << "Credentials found";
}

void UbuntuOneDBus::credentialsNotFound()
{
  std::cout << "Credentials not found" << std::endl;
}

void UbuntuOneDBus::credentialsError()
{
  std::cout << "Credentials error" << std::endl;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:31:59+00:00Added an answer on June 7, 2026 at 2:31 am

    I think that you forgot to run

    QDBusConnection QDBusConnection::connectToBus ( BusType type, 
                                                    const QString & name )
    

    and then check

    bool QDBusConnection::isConnected () const
    

    before invoking

    void UbuntuOneDBus::connectReturnSignals()
    

    or run program with some flags, but this should be easier.

    I don’t want what is your goal but maybe you should also try

    bool QDBusConnection::registerObject ( const QString & path, QObject * object, 
                                           RegisterOptions options = ExportAdaptors )
    

    Here some documentation:
    connectToBus

    isConnected

    registerObject

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time using git, and I am not sure what is
This is my first time using a database and I'm not really sure how
This is my first time using BalloonHints. I'm using Delphi 2010. I'm not sure
This is our first time using this pattern (we're not even sure that this
this is my first time using the list STL and i'm not sure if
This is my first time using JFileChooser in Java and I'm currently attempting to
It's the first time I'm using DBus so please bear with me. This is
This is my first time using SQL, and I thought I did everything right,
I'm trying to connect to an Orcle DB. This is my first time using
This is my first time using XML documents. What I'm trying to do is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.