[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:24 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=f237a65

The following commit has been merged in the master branch:
commit f237a659ec581d1f16c56416039b3a7a3bb1698e
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Mon Mar 23 00:39:36 2015 -0700

    Added a link to the Android app from the KCM
---
 kcm/kcm.cpp |  8 ++++++-
 kcm/kcm.ui  | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 83 insertions(+), 4 deletions(-)

diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
index 16f35b8..e053aca 100644
--- a/kcm/kcm.cpp
+++ b/kcm/kcm.cpp
@@ -63,6 +63,10 @@ KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&)
     kcmUi->progressBar->setVisible(false);
     kcmUi->messages->setVisible(false);
 
+    //Workaround: If we set this directly (or if we set it in the .ui file), the layout breaks
+    kcmUi->noDeviceLinks->setWordWrap(false);
+    QTimer::singleShot(0, [this] { kcmUi->noDeviceLinks->setWordWrap(true); });
+
     kcmUi->rename_label->setText(daemon->announcedName());
     kcmUi->rename_edit->setText(daemon->announcedName());
     setRenameMode(false);
@@ -133,6 +137,8 @@ void KdeConnectKcm::resetSelection()
 void KdeConnectKcm::deviceSelected(const QModelIndex& current)
 {
 
+    kcmUi->noDevicePlaceholder->setVisible(false);
+
     if (currentDevice) {
         disconnect(currentDevice,SIGNAL(pairingSuccesful()),
             this, SLOT(pairingSuccesful()));
@@ -181,7 +187,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
     //KPluginSelector has no way to remove a list of plugins and load another, so we need to destroy and recreate it each time
     delete kcmUi->pluginSelector;
     kcmUi->pluginSelector = new KPluginSelector(this);
-    kcmUi->verticalLayout_2->addWidget(kcmUi->pluginSelector);
+    kcmUi->deviceInfo_layout->addWidget(kcmUi->pluginSelector);
 
     kcmUi->pluginSelector->setConfigurationArguments(QStringList(currentDevice->id()));
 
diff --git a/kcm/kcm.ui b/kcm/kcm.ui
index d3bb9af..6f763c8 100644
--- a/kcm/kcm.ui
+++ b/kcm/kcm.ui
@@ -111,14 +111,14 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="deviceInfoBorder_2">
+    <widget class="QGroupBox" name="deviceInfoBorder">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <layout class="QVBoxLayout" name="deviceInfoBorder">
+     <layout class="QVBoxLayout" name="deviceInfoBorder_layout">
       <item>
        <widget class="QWidget" name="deviceInfo" native="true">
         <property name="sizePolicy">
@@ -127,7 +127,7 @@
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <layout class="QVBoxLayout" name="verticalLayout_2">
+        <layout class="QVBoxLayout" name="deviceInfo_layout">
          <item>
           <widget class="QWidget" name="header_2" native="true">
            <property name="sizePolicy">
@@ -260,6 +260,79 @@
         </layout>
        </widget>
       </item>
+      <item>
+       <widget class="QWidget" name="noDevicePlaceholder" native="true">
+        <layout class="QVBoxLayout" name="noDevicePlaceholder_layout">
+         <item>
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QLabel" name="noDeviceLabel">
+           <property name="text">
+            <string>No device selected.</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="noDeviceLinks">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>If you have an Android phone, make sure to install the <a href="https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp"><span style=" text-decoration: underline; color:#0000ff;">KDE Connect Android app</span></a> (also available <a href="https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp"><span style=" text-decoration: underline; color:#0000ff;">from F-Droid</span></a>).</string>
+           </property>
+           <property name="textFormat">
+            <enum>Qt::RichText</enum>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+           <property name="margin">
+            <number>40</number>
+           </property>
+           <property name="openExternalLinks">
+            <bool>true</bool>
+           </property>
+           <property name="textInteractionFlags">
+            <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="verticalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list