ruby-qt6-qtdbus 2.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e9dc5407c193ea060c1980323498c0e9561fd132dc230706ddb6df6e81a94da
4
- data.tar.gz: df2917ac0993e1bc17cdca2546d71019910d046661e9f2d81da4e4cb5193f1b7
3
+ metadata.gz: 921610a9bbaf288cc955aa97e66cfddb1d9d8894be99a2d0e882f42e7df6360d
4
+ data.tar.gz: 95f78476b4619d26077d0655c20acb99ef7eb456ed35fbd10ce0fd600569311e
5
5
  SHA512:
6
- metadata.gz: c876941d1e18cb93a578f89f411d92052ed58605cd49b885b2778e12e742ca3f7d78fdcd398cb089a51e8cff3904d58cd6599a6733d05d8e91bac29baf416f93
7
- data.tar.gz: f4d412676ab754057a7e15bd86748a4eeb29593b057fcff6041e0b52dde3d6a58d347d48af18dc2c067d62a1e71ca8d1f5431e9ad51d204b4f9418950f50f6e7
6
+ metadata.gz: 24e7819bce613e65c31682306877f6f5a898769235920d877968dc914aa835dccaa20cc31185af45604c8e07d02b15fde17998361975da6347bffcd3c575b899
7
+ data.tar.gz: 40de43f58499818ab0bd956934465a2d15d087d3bf4236ad8d9b52eb8943f6bf12a8cc9e318e260d1e78fd9f61a744828d96c58fc7298331508c2e96fa660243
@@ -9,7 +9,8 @@ void Init_qdbusabstractadaptor(Module rb_mQt6QtDBus)
9
9
  {
10
10
  rb_cQDBusAbstractAdaptor =
11
11
  // RubyQt6::QtDBus::QDBusAbstractAdaptor
12
- define_class_under<QDBusAbstractAdaptor, QObject>(rb_mQt6QtDBus, "QDBusAbstractAdaptor")
12
+ define_qlass_under<QDBusAbstractAdaptor, QObject>(rb_mQt6QtDBus, "QDBusAbstractAdaptor")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDBusAbstractAdaptor * { return qobject_cast<QDBusAbstractAdaptor *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDBusAbstractAdaptor::staticMetaObject; });
15
16
  }
@@ -9,8 +9,9 @@ void Init_qdbusabstractinterface(Module rb_mQt6QtDBus)
9
9
  {
10
10
  rb_cQDBusAbstractInterface =
11
11
  // RubyQt6::QtDBus::QDBusAbstractInterface
12
- define_class_under<QDBusAbstractInterface, QObject>(rb_mQt6QtDBus, "QDBusAbstractInterface")
12
+ define_qlass_under<QDBusAbstractInterface, QObject>(rb_mQt6QtDBus, "QDBusAbstractInterface")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDBusAbstractInterface * { return qobject_cast<QDBusAbstractInterface *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDBusAbstractInterface::staticMetaObject; })
15
16
  // Public Functions
16
17
  .define_method("async_call_with_argument_list", &QDBusAbstractInterface::asyncCallWithArgumentList, Arg("method"), Arg("args"))
@@ -16,7 +16,7 @@ void Init_qdbusconnection(Module rb_mQt6QtDBus)
16
16
  {
17
17
  rb_cQDBusConnection =
18
18
  // RubyQt6::QtDBus::QDBusConnection
19
- define_class_under<QDBusConnection>(rb_mQt6QtDBus, "QDBusConnection")
19
+ define_qlass_under<QDBusConnection>(rb_mQt6QtDBus, "QDBusConnection")
20
20
  // Constructor
21
21
  .define_constructor(Constructor<QDBusConnection, const QString &>(), Arg("name"))
22
22
  // Public Functions
@@ -10,8 +10,9 @@ void Init_qdbusconnectioninterface(Module rb_mQt6QtDBus)
10
10
  {
11
11
  rb_cQDBusConnectionInterface =
12
12
  // RubyQt6::QtDBus::QDBusConnectionInterface
13
- define_class_under<QDBusConnectionInterface, QDBusAbstractInterface>(rb_mQt6QtDBus, "QDBusConnectionInterface")
13
+ define_qlass_under<QDBusConnectionInterface, QDBusAbstractInterface>(rb_mQt6QtDBus, "QDBusConnectionInterface")
14
14
  // RubyQt6-Defined Functions
15
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDBusConnectionInterface * { return qobject_cast<QDBusConnectionInterface *>(object); })
15
16
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDBusConnectionInterface::staticMetaObject; })
16
17
  // Public Functions
17
18
  .define_method("activatable_service_names", &QDBusConnectionInterface::activatableServiceNames)
@@ -12,7 +12,7 @@ void Init_qdbuserror(Module rb_mQt6QtDBus)
12
12
  {
13
13
  rb_cQDBusError =
14
14
  // RubyQt6::QtDBus::QDBusError
15
- define_class_under<QDBusError>(rb_mQt6QtDBus, "QDBusError")
15
+ define_qlass_under<QDBusError>(rb_mQt6QtDBus, "QDBusError")
16
16
  // Constructor
17
17
  .define_constructor(Constructor<QDBusError, const QDBusMessage&>(), Arg("message"))
18
18
  .define_constructor(Constructor<QDBusError, QDBusError::ErrorType, const QString &>(), Arg("type"), Arg("message"))
@@ -9,8 +9,9 @@ void Init_qdbusinterface(Module rb_mQt6QtDBus)
9
9
  {
10
10
  rb_cQDBusInterface =
11
11
  // RubyQt6::QtDBus::QDBusInterface
12
- define_class_under<QDBusInterface, QDBusAbstractInterface>(rb_mQt6QtDBus, "QDBusInterface")
12
+ define_qlass_under<QDBusInterface, QDBusAbstractInterface>(rb_mQt6QtDBus, "QDBusInterface")
13
13
  // RubyQt6-Defined Functions
14
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDBusInterface * { return qobject_cast<QDBusInterface *>(object); })
14
15
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDBusInterface::staticMetaObject; })
15
16
  // Constructor
16
17
  .define_constructor(Constructor<QDBusInterface, const QString &, const QString &, const QString &, const QDBusConnection &, QObject *>(), Arg("service"), Arg("path"), Arg("interface"), Arg("connection"), Arg("parent"));
@@ -10,7 +10,7 @@ void Init_qdbusmessage(Module rb_mQt6QtDBus)
10
10
  {
11
11
  rb_cQDBusMessage =
12
12
  // RubyQt6::QtDBus::QDBusMessage
13
- define_class_under<QDBusMessage>(rb_mQt6QtDBus, "QDBusMessage")
13
+ define_qlass_under<QDBusMessage>(rb_mQt6QtDBus, "QDBusMessage")
14
14
  // Constructor
15
15
  .define_constructor(Constructor<QDBusMessage>())
16
16
  // Public Functions
@@ -14,8 +14,9 @@ void Init_qdbusservicewatcher(Module rb_mQt6QtDBus)
14
14
  {
15
15
  rb_cQDBusServiceWatcher =
16
16
  // RubyQt6::QtDBus::QDBusServiceWatcher
17
- define_class_under<QDBusServiceWatcher, QObject>(rb_mQt6QtDBus, "QDBusServiceWatcher")
17
+ define_qlass_under<QDBusServiceWatcher, QObject>(rb_mQt6QtDBus, "QDBusServiceWatcher")
18
18
  // RubyQt6-Defined Functions
19
+ .define_singleton_function("_qobject_cast", [](QObject *object) -> const QDBusServiceWatcher * { return qobject_cast<QDBusServiceWatcher *>(object); })
19
20
  .define_singleton_function("_static_meta_object", []() -> const QMetaObject * { return &QDBusServiceWatcher::staticMetaObject; })
20
21
  // Constructor
21
22
  .define_constructor(Constructor<QDBusServiceWatcher, QObject *>(), Arg("parent"))
@@ -10,7 +10,7 @@ void Init_qdbusvariant(Module rb_mQt6QtDBus)
10
10
 
11
11
  rb_cQDBusVariant =
12
12
  // RubyQt6::QtDBus::QDBusVariant
13
- define_class_under<QDBusVariant>(rb_mQt6QtDBus, "QDBusVariant")
13
+ define_qlass_under<QDBusVariant>(rb_mQt6QtDBus, "QDBusVariant")
14
14
  // RubyQt6-Defined Functions
15
15
  .define_singleton_function("_qvariant_register_metatype", []() -> int { return qRegisterMetaType<QDBusVariant>(); })
16
16
  .define_singleton_function("_qvariant_from_value", [](const QDBusVariant &value) -> QVariant { return QVariant::fromValue(value); })
@@ -1,4 +1,5 @@
1
1
  #include "qtdbus-rb.hpp"
2
+ #include "qtdbuspreludes-rb.hpp"
2
3
  #include "qtdbusversion-rb.hpp"
3
4
  #include "qdbus-rb.hpp"
4
5
 
@@ -26,6 +27,7 @@ extern "C" void Init_qtdbus()
26
27
  Module rb_mQt6 = define_module("RubyQt6");
27
28
  Module rb_mQt6QtDBus = define_module_under(rb_mQt6, "QtDBus");
28
29
 
30
+ Init_qtdbuspreludes(rb_mQt6);
29
31
  Init_qtdbusversion(rb_mQt6QtDBus);
30
32
  Init_qdbus(rb_mQt6QtDBus);
31
33
 
@@ -0,0 +1,9 @@
1
+ #include "qtdbuspreludes-rb.hpp"
2
+ #include <rice/qt6/preludes/libqt6core.hpp>
3
+
4
+ RICE4RUBYQT6_USE_NAMESPACE
5
+
6
+ void Init_qtdbuspreludes(Module rb_mQt6)
7
+ {
8
+ declare_qlass_under_libqt6core(rb_mQt6);
9
+ }
@@ -0,0 +1,5 @@
1
+ #include <rice/qt6.hpp>
2
+
3
+ RICE4RUBYQT6_USE_NAMESPACE
4
+
5
+ void Init_qtdbuspreludes(Module rb_mQt6);
@@ -26,7 +26,7 @@ module RubyQt6
26
26
 
27
27
  # @!visibility private
28
28
  def call(*args)
29
- mode = args_nth_delete_callmode(args, 0) || QtDBus::QDBus::AutoDetect
29
+ mode = args_nth_delete_callmode(args, 0) || QDBus::AutoDetect
30
30
  method = args.delete_at(0)
31
31
  call_with_argument_list(mode, T.to_qstr(method), T.to_qvariantlist(args))
32
32
  end
@@ -34,7 +34,7 @@ module RubyQt6
34
34
  private
35
35
 
36
36
  def args_nth_delete_callmode(args, index)
37
- return unless args[index].is_a?(QtDBus::QDBus::CallMode)
37
+ return unless args[index].is_a?(QDBus::CallMode)
38
38
  args.delete_at(index)
39
39
  end
40
40
  end
@@ -28,7 +28,7 @@ module RubyQt6
28
28
 
29
29
  # @!visibility private
30
30
  def register_object(*args)
31
- options = args_nth_delete_registeroptions(args, -1) || QtDBus::QDBusConnection::ExportAdaptors
31
+ options = args_nth_delete_registeroptions(args, -1) || QDBusConnection::ExportAdaptors
32
32
  case args.size
33
33
  when 2 then _register_object(T.to_qstr(args[-2]), args[-1], T.to_qflags(options))
34
34
  when 3 then _register_object(T.to_qstr(args[-3]), T.to_qstr(args[-2]), args[-1], T.to_qflags(options))
@@ -44,7 +44,7 @@ module RubyQt6
44
44
  private
45
45
 
46
46
  def args_nth_delete_registeroptions(args, index)
47
- return unless args[index].is_a?(QtDBus::QDBusConnection::RegisterOption) || args[index].is_a?(QtDBus::QDBusConnection::RegisterOptions)
47
+ return unless args[index].is_a?(QDBusConnection::RegisterOption) || args[index].is_a?(QDBusConnection::RegisterOptions)
48
48
  args.delete_at(index)
49
49
  end
50
50
  end
@@ -18,7 +18,7 @@ module RubyQt6
18
18
  # @param parent [QObject]
19
19
  # @return [QDBusInterface]
20
20
  def initialize(service, path, interface = "", connection = nil, parent = nil)
21
- connection ||= QtDBus::QDBusConnection.session_bus
21
+ connection ||= QDBusConnection.session_bus
22
22
  _initialize(T.to_qstr(service), T.to_qstr(path), T.to_qstr(interface), connection, parent)
23
23
  _take_ownership_from_ruby(self)
24
24
  end
@@ -13,15 +13,15 @@ module RubyQt6
13
13
  # @param message [QDBusMessage]
14
14
  # @return [QDBusReply]
15
15
  def initialize(message)
16
- @error = QtDBus::QDBusError.new(message)
16
+ @error = QDBusError.new(message)
17
17
  if @error.valid?
18
- @data = QtCore::QVariant.new("")
18
+ @data = QVariant.new("")
19
19
  return
20
20
  end
21
21
 
22
22
  if message.arguments.size < 1
23
- @error = QtDBus::QDBusError.new(QtDBus::QDBusError::ErrorType::InvalidSignature, "Unexpected reply signature")
24
- @data = QtCore::QVariant.new("")
23
+ @error = QDBusError.new(QDBusError::ErrorType::InvalidSignature, "Unexpected reply signature")
24
+ @data = QVariant.new("")
25
25
  return
26
26
  end
27
27
 
@@ -5,7 +5,12 @@ module RubyQt6
5
5
  # @see https://doc.qt.io/qt-6/qdbusvariant.html
6
6
  class QDBusVariant
7
7
  # @!parse
8
- QtCore::QVariant.register(_qvariant_register_metatype, method(:_qvariant_from_value), method(:_qvariant_to_value), from: self)
8
+ QVariant.register(
9
+ _qvariant_register_metatype,
10
+ method(:_qvariant_from_value),
11
+ method(:_qvariant_to_value),
12
+ from: self
13
+ )
9
14
 
10
15
  # @!visibility private
11
16
  alias_method :_initialize, :initialize
@@ -13,7 +18,7 @@ module RubyQt6
13
18
  # @param variant [QVariant]
14
19
  # @return [QDBusVariant]
15
20
  def initialize(variant)
16
- variant = variant.is_a?(QtCore::QVariant) ? variant : QtCore::QVariant.new(variant)
21
+ variant = variant.is_a?(QVariant) ? variant : QVariant.new(variant)
17
22
  _initialize(variant)
18
23
  end
19
24
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyQt6
4
4
  module QtDBus
5
- QTDBUS_RUBYGEM_VERSION = "2.0.0"
5
+ QTDBUS_RUBYGEM_VERSION = "6.0.0"
6
6
  end
7
7
  end
data/lib/qt6/qtdbus.rb CHANGED
@@ -21,3 +21,5 @@ require_relative "qtdbus/qdbusservicewatcher"
21
21
 
22
22
  require_relative "bando/qdbusabstractadaptor"
23
23
  require_relative "bando/qdbusabstractinterface"
24
+
25
+ RubyQt6.initialize!(RubyQt6::QtDBus)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-qt6-qtdbus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Doe
@@ -15,28 +15,28 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 2.0.0
18
+ version: 6.0.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 2.0.0
25
+ version: 6.0.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: ruby-qt6-qtcore
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 2.0.0
32
+ version: 6.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 2.0.0
39
+ version: 6.0.0
40
40
  description: Ruby Bindings for Qt D-Bus.
41
41
  email:
42
42
  - johndoe@example.com
@@ -77,6 +77,8 @@ files:
77
77
  - ext/qt6/qtdbus/qdbusvariant-rb.hpp
78
78
  - ext/qt6/qtdbus/qtdbus-rb.cpp
79
79
  - ext/qt6/qtdbus/qtdbus-rb.hpp
80
+ - ext/qt6/qtdbus/qtdbuspreludes-rb.cpp
81
+ - ext/qt6/qtdbus/qtdbuspreludes-rb.hpp
80
82
  - ext/qt6/qtdbus/qtdbusversion-rb.cpp
81
83
  - ext/qt6/qtdbus/qtdbusversion-rb.hpp
82
84
  - ext/qt6/qtdbus/t-qtdbus-rb.cpp