forked from pool/fcitx
Accepting request 138088 from home:MargueriteSu:branches:M17N
OBS-URL: https://build.opensuse.org/request/show/138088 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=51
This commit is contained in:
parent
77d8c38788
commit
2bdf7d121e
@ -1,55 +0,0 @@
|
||||
diff --git a/src/frontend/qt/fcitx-input-context.cpp b/src/frontend/qt/fcitx-input-context.cpp
|
||||
index 5ba941b..6e5a9d9 100644
|
||||
--- a/src/frontend/qt/fcitx-input-context.cpp
|
||||
+++ b/src/frontend/qt/fcitx-input-context.cpp
|
||||
@@ -113,11 +113,37 @@ typedef QInputMethodEvent::Attribute QAttribute;
|
||||
|
||||
static bool key_filtered = false;
|
||||
|
||||
+QByteArray QFcitxInputContext::localMachineId()
|
||||
+{
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
|
||||
+ return QDBusConnection::localMachineId();
|
||||
+#else
|
||||
+ QFile file1("/var/lib/dbus/machine-id");
|
||||
+ QFile file2("/etc/machine-id");
|
||||
+ QFile* fileToRead = NULL;
|
||||
+ if (file1.open(QIODevice::ReadOnly)) {
|
||||
+ fileToRead = &file1;
|
||||
+ }
|
||||
+ else if (file2.open(QIODevice::ReadOnly)) {
|
||||
+ fileToRead = &file2;
|
||||
+ }
|
||||
+ if (fileToRead) {
|
||||
+ QByteArray result = fileToRead->readLine(1024);
|
||||
+ fileToRead->close();
|
||||
+ result = result.trimmed();
|
||||
+ if (!result.isEmpty())
|
||||
+ return result;
|
||||
+ }
|
||||
+ return "machine-id";
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
QString
|
||||
QFcitxInputContext::socketFile()
|
||||
{
|
||||
char* addressFile = NULL;
|
||||
- asprintf(&addressFile, "%s-%d", QDBusConnection::localMachineId().data(), fcitx_utils_get_display_number());
|
||||
+
|
||||
+ asprintf(&addressFile, "%s-%d", localMachineId().data(), fcitx_utils_get_display_number());
|
||||
|
||||
char* file = NULL;
|
||||
|
||||
diff --git a/src/frontend/qt/fcitx-input-context.h b/src/frontend/qt/fcitx-input-context.h
|
||||
index 6c7ecf4..ed7d2db 100644
|
||||
--- a/src/frontend/qt/fcitx-input-context.h
|
||||
+++ b/src/frontend/qt/fcitx-input-context.h
|
||||
@@ -102,6 +102,7 @@ private Q_SLOTS:
|
||||
void updateCursor();
|
||||
#endif
|
||||
private:
|
||||
+ static QByteArray localMachineId();
|
||||
static QString socketFile();
|
||||
static QString address();
|
||||
void cleanUp();
|
3
fcitx-4.2.6.1.tar.bz2
Normal file
3
fcitx-4.2.6.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:02cd766be443deeeeefec04900498c941e9034172dad2165a6ad04dd4d442864
|
||||
size 8476186
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7fa6f7b2ddb7de48aac5ead4f0ab68e5d6437504de353ca2f5610481388361d1
|
||||
size 8434363
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 11 14:03:53 UTC 2012 - i@marguerite.su
|
||||
|
||||
- update to 4.2.6.1
|
||||
* a bugfix release, fix including:
|
||||
+ FreeBSD xlib path detection
|
||||
+ A few crash related bug
|
||||
+ reduce remove call that save profile
|
||||
+ Workaround a bug for qt older than 4.8.0
|
||||
(http://code.google.com/p/fcitx/issues/detail?id=630)
|
||||
+ fcitx-config-gtk3 will not be called under KDE.
|
||||
+ fcitx-table-emoji not usable under 4.2.6
|
||||
+ IM switchkey will not be captured if there is only one im or no im at all.
|
||||
+ A bunch of fix for gtk im module.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 23 13:32:25 UTC 2012 - i@marguerite.su
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
%define libver -4_2_6
|
||||
|
||||
Name: fcitx
|
||||
Version: 4.2.6
|
||||
Version: 4.2.6.1
|
||||
Release: 0
|
||||
Summary: Flexible Context-aware Input Tool with eXtension
|
||||
License: GPL-2.0+
|
||||
@ -38,8 +38,6 @@ Source7: xinput-fcitx
|
||||
Source8: openSUSE-default.tar.gz
|
||||
#FIX-FOR-UPSTREAM i@marguerite.su - dont download online
|
||||
#Patch1: fix_fcitx_googlecode_resolv_error.patch
|
||||
#FIX-FOR-OPENSUSE wengxt@gmail.com - fix QDBusConnection in Qt 4.7
|
||||
Patch2: fcitx-4.2.6-openSUSE-12.1-QDBusConnection.patch
|
||||
BuildRequires: cairo-devel
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: dbus-1-devel
|
||||
@ -360,9 +358,6 @@ You can either use this package for download from kde-look.org using knewstaff i
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
#%patch1 -p1
|
||||
%if 0%{?suse_version} <= 1210
|
||||
%patch2 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
|
Loading…
Reference in New Issue
Block a user