ruby-qt6-qtcore 2.1.0 → 2.1.1
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/ext/qt6/qtcore/qdir-rb.cpp +4 -4
- data/ext/qt6/qtcore/qfileinfo-rb.cpp +1 -0
- data/ext/qt6/qtcore/qprocess-rb.cpp +2 -2
- data/ext/qt6/qtcore/qprocessenvironment-rb.cpp +4 -5
- data/ext/qt6/qtcore/qstring-rb.cpp +1 -0
- data/lib/qt6/qtcore/qdir.rb +16 -0
- data/lib/qt6/qtcore/qobject.rb +6 -0
- data/lib/qt6/qtcore/qprocess.rb +6 -0
- data/lib/qt6/qtcore/qprocessenvironment.rb +20 -0
- data/lib/qt6/qtcore/qregularexpression.rb +5 -0
- data/lib/qt6/qtcore/qsettings.rb +4 -2
- data/lib/qt6/qtcore/qstring.rb +7 -1
- data/lib/qt6/qtcore/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9816cbe48c65da78617a04fea9ac06a06dd4bbcfca21c3f2ec953df383d2515
|
|
4
|
+
data.tar.gz: 3bc996d8cdfa02eb63c413eaa08737a0e985bb7061675d59c3fbe3843a65eb63
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f2c0acd29970391ea32175d012d0a0f1ca178f2b249f9eb9628c02c7229d91a6f5d0fea84b29433c8a3489ddae2efa8208de035067d5f9ea32922438d53399e
|
|
7
|
+
data.tar.gz: 146d9642fbaf1553fc69b8c06321ce7c4cc1a14cbd7868e3787d3f688a9399e6d5a1b540cdfe7eee7bdee4c33a1a9499d1cc01e5f18e7096fc9c3a76cb9d85fe
|
data/ext/qt6/qtcore/qdir-rb.cpp
CHANGED
|
@@ -19,7 +19,7 @@ void Init_qdir(Module rb_mQt6QtCore)
|
|
|
19
19
|
.define_constructor(Constructor<QDir, const QString &>(), Arg("path"))
|
|
20
20
|
.define_constructor(Constructor<QDir, const QString &, const QString &>(), Arg("path"), Arg("name_filter"))
|
|
21
21
|
// Public Functions
|
|
22
|
-
.define_method("
|
|
22
|
+
.define_method("_absolute_file_path", &QDir::absoluteFilePath, Arg("file_name"))
|
|
23
23
|
.define_method("absolute_path", &QDir::absolutePath)
|
|
24
24
|
.define_method("canonical_path", &QDir::canonicalPath)
|
|
25
25
|
.define_method("cd", &QDir::cd, Arg("dir_name"))
|
|
@@ -30,9 +30,9 @@ void Init_qdir(Module rb_mQt6QtCore)
|
|
|
30
30
|
.define_method<QFileInfoList (QDir::*)(const QStringList &, QDir::Filters, QDir::SortFlags) const>("entry_info_list", &QDir::entryInfoList, Arg("name_filters"), Arg("filters") = static_cast<QDir::Filters>(QDir::Filter::NoFilter), Arg("sort") = static_cast<QDir::SortFlags>(QDir::SortFlag::NoSort))
|
|
31
31
|
.define_method<QStringList (QDir::*)(QDir::Filters, QDir::SortFlags) const>("entry_list", &QDir::entryList, Arg("filters") = static_cast<QDir::Filters>(QDir::Filter::NoFilter), Arg("sort") = static_cast<QDir::SortFlags>(QDir::SortFlag::NoSort))
|
|
32
32
|
.define_method<QStringList (QDir::*)(const QStringList &, QDir::Filters, QDir::SortFlags) const>("entry_list", &QDir::entryList, Arg("name_filters"), Arg("filters") = static_cast<QDir::Filters>(QDir::Filter::NoFilter), Arg("sort") = static_cast<QDir::SortFlags>(QDir::SortFlag::NoSort))
|
|
33
|
-
.define_method<bool (QDir::*)() const>("
|
|
34
|
-
.define_method<bool (QDir::*)(const QString &) const>("
|
|
35
|
-
.define_method("
|
|
33
|
+
.define_method<bool (QDir::*)() const>("_exists", &QDir::exists)
|
|
34
|
+
.define_method<bool (QDir::*)(const QString &) const>("_exists", &QDir::exists, Arg("name"))
|
|
35
|
+
.define_method("_file_path", &QDir::filePath, Arg("file_name"))
|
|
36
36
|
.define_method("filesystem_absolute_path", &QDir::filesystemAbsolutePath)
|
|
37
37
|
.define_method("filesystem_canonical_path", &QDir::filesystemCanonicalPath)
|
|
38
38
|
.define_method("filesystem_path", &QDir::filesystemPath)
|
|
@@ -18,6 +18,7 @@ void Init_qfileinfo(Module rb_mQt6QtCore)
|
|
|
18
18
|
.define_constructor(Constructor<QFileInfo, const QString &>(), Arg("file"))
|
|
19
19
|
.define_constructor(Constructor<QFileInfo, const QFileDevice &>(), Arg("file"))
|
|
20
20
|
.define_constructor(Constructor<QFileInfo, const QDir &, const QString &>(), Arg("dir"), Arg("file"))
|
|
21
|
+
.define_constructor(Constructor<QFileInfo, const QFileInfo &>(), Arg("other"))
|
|
21
22
|
// Public Functions
|
|
22
23
|
.define_method("absolute_dir", &QFileInfo::absoluteDir)
|
|
23
24
|
.define_method("absolute_file_path", &QFileInfo::absoluteFilePath)
|
|
@@ -50,8 +50,8 @@ void Init_qprocess(Module rb_mQt6QtCore)
|
|
|
50
50
|
.define_method("set_standard_output_file", &QProcess::setStandardOutputFile, Arg("file_name"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::Truncate))
|
|
51
51
|
.define_method("set_standard_output_process", &QProcess::setStandardOutputProcess, Arg("destination"))
|
|
52
52
|
.define_method("set_working_directory", &QProcess::setWorkingDirectory, Arg("dir"))
|
|
53
|
-
.define_method<void (QProcess::*)(QIODeviceBase::OpenMode)>("
|
|
54
|
-
.define_method<void (QProcess::*)(const QString &, const QStringList &, QIODeviceBase::OpenMode)>("
|
|
53
|
+
.define_method<void (QProcess::*)(QIODeviceBase::OpenMode)>("_start", &QProcess::start, Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
|
|
54
|
+
.define_method<void (QProcess::*)(const QString &, const QStringList &, QIODeviceBase::OpenMode)>("_start", &QProcess::start, Arg("program"), Arg("arguments") = static_cast<const QStringList &>(QStringList {}), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
|
|
55
55
|
.define_method("start_command", &QProcess::startCommand, Arg("command"), Arg("mode") = static_cast<QIODeviceBase::OpenMode>(QIODeviceBase::ReadWrite))
|
|
56
56
|
.define_method<bool (QProcess::*)(qint64 *)>("start_detached", &QProcess::startDetached, Arg("pid") = static_cast<qint64 *>(nullptr))
|
|
57
57
|
.define_method("state", &QProcess::state)
|
|
@@ -13,15 +13,14 @@ void Init_qprocessenvironment(Module rb_mQt6QtCore)
|
|
|
13
13
|
define_class_under<QProcessEnvironment>(rb_mQt6QtCore, "QProcessEnvironment")
|
|
14
14
|
// Public Functions
|
|
15
15
|
.define_method("clear", &QProcessEnvironment::clear)
|
|
16
|
-
.define_method("
|
|
16
|
+
.define_method("_contains", &QProcessEnvironment::contains, Arg("name"))
|
|
17
17
|
.define_method("inherits_from_parent", &QProcessEnvironment::inheritsFromParent)
|
|
18
|
-
.define_method<void (QProcessEnvironment::*)(const QString &, const QString &)>("
|
|
19
|
-
.define_method<void (QProcessEnvironment::*)(const QProcessEnvironment &)>("insert", &QProcessEnvironment::insert, Arg("e"))
|
|
18
|
+
.define_method<void (QProcessEnvironment::*)(const QString &, const QString &)>("_insert", &QProcessEnvironment::insert, Arg("name"), Arg("value"))
|
|
20
19
|
.define_method("empty?", &QProcessEnvironment::isEmpty)
|
|
21
20
|
.define_method("keys", &QProcessEnvironment::keys)
|
|
22
|
-
.define_method("
|
|
21
|
+
.define_method("_remove", &QProcessEnvironment::remove, Arg("name"))
|
|
23
22
|
.define_method("to_string_list", &QProcessEnvironment::toStringList)
|
|
24
|
-
.define_method("
|
|
23
|
+
.define_method("_value", &QProcessEnvironment::value, Arg("name"), Arg("default_value") = static_cast<const QString &>(QString()))
|
|
25
24
|
// Static Public Members
|
|
26
25
|
.define_singleton_function("system_environment", &QProcessEnvironment::systemEnvironment);
|
|
27
26
|
|
|
@@ -62,6 +62,7 @@ void Init_qstring(Module rb_mQt6QtCore)
|
|
|
62
62
|
.define_method("to_std_string", &QString::toStdString)
|
|
63
63
|
.define_method<bool (QString::*)(const QRegularExpression &, QRegularExpressionMatch *) const>("_contains", &QString::contains, Arg("re"), Arg("rmatch") = static_cast<QRegularExpressionMatch *>(nullptr))
|
|
64
64
|
.define_method<bool (QString::*)(const QString &, Qt::CaseSensitivity) const>("_contains", &QString::contains, Arg("s"), Arg("cs") = static_cast<Qt::CaseSensitivity>(Qt::CaseSensitive))
|
|
65
|
+
.define_method<bool (QString::*)(const QString &, Qt::CaseSensitivity) const>("_ends_with", &QString::endsWith, Arg("s"), Arg("cs") = static_cast<Qt::CaseSensitivity>(Qt::CaseSensitive))
|
|
65
66
|
.define_method<qsizetype (QString::*)(const QString &, qsizetype, Qt::CaseSensitivity) const>("_index_of", &QString::indexOf, Arg("s"), Arg("from") = static_cast<qsizetype>(0), Arg("cs") = static_cast<Qt::CaseSensitivity>(Qt::CaseSensitive))
|
|
66
67
|
.define_method<qsizetype (QString::*)(const QRegularExpression &, qsizetype, QRegularExpressionMatch *) const>("_index_of", &QString::indexOf, Arg("re"), Arg("from") = static_cast<qsizetype>(0), Arg("rmatch") = static_cast<QRegularExpressionMatch *>(nullptr))
|
|
67
68
|
.define_method<QStringList (QString::*)(const QString &, Qt::SplitBehavior, Qt::CaseSensitivity) const>("_split", &QString::split, Arg("sep"), Arg("behavior") = static_cast<Qt::SplitBehavior>(Qt::KeepEmptyParts), Arg("cs") = static_cast<Qt::CaseSensitivity>(Qt::CaseSensitive))
|
data/lib/qt6/qtcore/qdir.rb
CHANGED
|
@@ -30,6 +30,22 @@ module RubyQt6
|
|
|
30
30
|
_initialize(*args)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# @!visibility private
|
|
34
|
+
def absolute_file_path(file_name)
|
|
35
|
+
_absolute_file_path(T.to_qstr(file_name))
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @!visibility private
|
|
39
|
+
def exists(*args)
|
|
40
|
+
T.args_nth_to_qstr(args, 0)
|
|
41
|
+
_exists(*args)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# @!visibility private
|
|
45
|
+
def file_path(file_name)
|
|
46
|
+
_file_path(T.to_qstr(file_name))
|
|
47
|
+
end
|
|
48
|
+
|
|
33
49
|
# @!visibility private
|
|
34
50
|
def inspect
|
|
35
51
|
T.inspect_struct(self, absolute_path: absolute_path.to_s)
|
data/lib/qt6/qtcore/qobject.rb
CHANGED
|
@@ -104,6 +104,12 @@ module RubyQt6
|
|
|
104
104
|
QCoreApplication.translate(context, source_text, disambiguation, n)
|
|
105
105
|
end
|
|
106
106
|
|
|
107
|
+
# @!visibility private
|
|
108
|
+
def ==(other)
|
|
109
|
+
return false unless other.is_a?(QObject)
|
|
110
|
+
_qobject_ptr == other._qobject_ptr
|
|
111
|
+
end
|
|
112
|
+
|
|
107
113
|
private
|
|
108
114
|
|
|
109
115
|
def _take_ownership_from_ruby(object)
|
data/lib/qt6/qtcore/qprocess.rb
CHANGED
|
@@ -6,6 +6,26 @@ module RubyQt6
|
|
|
6
6
|
class QProcessEnvironment
|
|
7
7
|
# @!parse class Initialization; end
|
|
8
8
|
rubyqt6_declare_enum_under QProcessEnvironment, QProcessEnvironment::Initialization
|
|
9
|
+
|
|
10
|
+
# @!visibility private
|
|
11
|
+
def contains(name)
|
|
12
|
+
_contains(T.to_qstr(name))
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @!visibility private
|
|
16
|
+
def insert(name, value)
|
|
17
|
+
_insert(T.to_qstr(name), T.to_qstr(value))
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @!visibility private
|
|
21
|
+
def remove(name)
|
|
22
|
+
_remove(T.to_qstr(name))
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# @!visibility private
|
|
26
|
+
def value(name, default_value = "")
|
|
27
|
+
_value(T.to_qstr(name), T.to_qstr(default_value))
|
|
28
|
+
end
|
|
9
29
|
end
|
|
10
30
|
end
|
|
11
31
|
end
|
data/lib/qt6/qtcore/qsettings.rb
CHANGED
|
@@ -21,9 +21,11 @@ module RubyQt6
|
|
|
21
21
|
# @param organization [QString]
|
|
22
22
|
# @param application [QString]
|
|
23
23
|
# @return [QSettings]
|
|
24
|
-
def initialize(organization, application)
|
|
24
|
+
def initialize(organization = nil, application = nil)
|
|
25
25
|
format = QSettings.default_format
|
|
26
26
|
scope = QSettings::Scope::UserScope
|
|
27
|
+
organization ||= QApplication.organization_name
|
|
28
|
+
application ||= QApplication.application_name
|
|
27
29
|
_initialize(format, scope, T.to_qstr(organization), T.to_qstr(application))
|
|
28
30
|
end
|
|
29
31
|
|
|
@@ -59,7 +61,7 @@ module RubyQt6
|
|
|
59
61
|
end
|
|
60
62
|
|
|
61
63
|
# @!visibility private
|
|
62
|
-
def value(key, default
|
|
64
|
+
def value(key, default)
|
|
63
65
|
qvariant = _value(T.to_qanystringview(key))
|
|
64
66
|
return default unless qvariant.valid?
|
|
65
67
|
|
data/lib/qt6/qtcore/qstring.rb
CHANGED
|
@@ -11,7 +11,7 @@ module RubyQt6
|
|
|
11
11
|
|
|
12
12
|
# @param str [String]
|
|
13
13
|
# @return [QString]
|
|
14
|
-
def initialize(str)
|
|
14
|
+
def initialize(str = "")
|
|
15
15
|
_initialize(str)
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -21,6 +21,12 @@ module RubyQt6
|
|
|
21
21
|
_contains(*args)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
# @!visibility private
|
|
25
|
+
def ends_with(*args)
|
|
26
|
+
T.args_nth_to_qstr(args, 0)
|
|
27
|
+
_ends_with(*args)
|
|
28
|
+
end
|
|
29
|
+
|
|
24
30
|
# @!visibility private
|
|
25
31
|
def index_of(*args)
|
|
26
32
|
T.args_nth_to_qstr(args, 0)
|
data/lib/qt6/qtcore/version.rb
CHANGED