ruby-qt6-qtdbus 2.0.0 → 2.1.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 +4 -4
- data/lib/qt6/qtdbus/qdbusabstractinterface.rb +2 -2
- data/lib/qt6/qtdbus/qdbusconnection.rb +2 -2
- data/lib/qt6/qtdbus/qdbusinterface.rb +1 -1
- data/lib/qt6/qtdbus/qdbusreply.rb +4 -4
- data/lib/qt6/qtdbus/qdbusvariant.rb +7 -2
- data/lib/qt6/qtdbus/version.rb +1 -1
- data/lib/qt6/qtdbus.rb +2 -0
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3414aa8397d8fbaa8cce955436d681a1d8d8bd21e181f8f240c94634f58a0176
|
|
4
|
+
data.tar.gz: 31e16bafd846d404ca27eb7f62526886db7417f90a14c8b1f6ca22ac67e559a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1daef53964e33c6f29d3987225cb69f0147ac6c916e6b43562da9df8cc8f08f4b22cd2da3368c8aafff108dd75ec0d0d0a0debdf5afb49233c6cfaf0fc005a7
|
|
7
|
+
data.tar.gz: 6b199a8a13f9dff988f9bbc057da350fa93c08810278aabe46124943324bc4edb390fc1d27b2e1b30f43a7cda4e1efd3bef5c397a5d7d26903c1595cc3117b9f
|
|
@@ -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) ||
|
|
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?(
|
|
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) ||
|
|
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?(
|
|
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 ||=
|
|
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 =
|
|
16
|
+
@error = QDBusError.new(message)
|
|
17
17
|
if @error.valid?
|
|
18
|
-
@data =
|
|
18
|
+
@data = QVariant.new("")
|
|
19
19
|
return
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
if message.arguments.size < 1
|
|
23
|
-
@error =
|
|
24
|
-
@data =
|
|
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
|
-
|
|
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?(
|
|
21
|
+
variant = variant.is_a?(QVariant) ? variant : QVariant.new(variant)
|
|
17
22
|
_initialize(variant)
|
|
18
23
|
end
|
|
19
24
|
end
|
data/lib/qt6/qtdbus/version.rb
CHANGED
data/lib/qt6/qtdbus.rb
CHANGED
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.
|
|
4
|
+
version: 2.1.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.
|
|
18
|
+
version: 2.1.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.
|
|
25
|
+
version: 2.1.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.
|
|
32
|
+
version: 2.1.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.
|
|
39
|
+
version: 2.1.0
|
|
40
40
|
description: Ruby Bindings for Qt D-Bus.
|
|
41
41
|
email:
|
|
42
42
|
- johndoe@example.com
|