Today's Dev #25

December 9, 2024

Short one today. Just spent some time trying to dig into why the GetAvailableModes D-Bus method isn't working:
[warning] QDBusConnection: couldn't handle call to GetAvailableModes, no slot matched
[warning] QDBusConnection: couldn't handle call to GetAvailableModes, no slot matched
[warning] Could not find slot DisplaysAdaptor::GetAvailableModes
Pretty strange seeing as the slot does exist:
public Q_SLOTS: // METHODS
    QList<QList<int>> GetAvailableModes(const QString &serial);
    QStringList GetAvailableOutputs();
    QVariantList GetCurrentOutputDetails(const QString &serial);
    void SetCurrentMode(const QString &serial, int width, int height, double refresh, bool preferred);
    void SetOutputEnabled(const QString &serial, bool enabled);
    void SetOutputPosition(const QString &serial, int x, int y);
Okay so what about in the client code?
QList<QList<int>> DisplaysAdaptor::GetAvailableModes(const QString& serial) {
  // handle method call org.buddiesofbudgie.BudgieDaemonX.Displays.GetAvailableModes
  QList<QList<int>> modes;
  QMetaObject::invokeMethod(parent(), "GetAvailableModes", Q_RETURN_ARG(QList<QList<int>>, modes), Q_ARG(QString, serial));
  return modes;
}
Yea okay so it's defined there too 🤔 Tried stashing all of my changes, still didn't work, so at least I know it's nothing in my current changes. Tried adding a qInfo to the DisplaysAdaptor method for it, never gets that far. Don't have the energy to dig deeper today, tomorrow I will see about going back further to see when it all borked.
Did you know?
You can follow me on Bluesky, Mastodon, or Threads!