summarylogtreecommitdiffstats
path: root/qt5.patch
diff options
context:
space:
mode:
Diffstat (limited to 'qt5.patch')
-rw-r--r--qt5.patch189
1 files changed, 0 insertions, 189 deletions
diff --git a/qt5.patch b/qt5.patch
deleted file mode 100644
index e87d1a678a3a..000000000000
--- a/qt5.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-diff -Naur a/install.sh b/install.sh
---- a/install.sh 2012-03-06 15:44:43.000000000 +0800
-+++ b/install.sh 2015-12-09 17:16:50.755868557 +0800
-@@ -1,11 +1,12 @@
- #!/bin/bash
--
-+basedir=$(cd `dirname $0`;pwd)
-+cd "$basedir"
- # root check
--if [ `whoami` != "root" ];
--then
-- echo "You have to be root to run this script ....";
-- exit -1;
--fi;
-+#if [ `whoami` != "root" ];
-+#then
-+# echo "You have to be root to run this script ....";
-+# exit -1;
-+#fi;
- echo "***********************************************"
- echo "* *"
- echo "* clean up ..................... *"
-@@ -18,31 +19,40 @@
- echo "* compiling .................... *"
- echo "* *"
- echo "***********************************************"
--qmake
-+mkdir -p "$basedir/build"
-+cd "$basedir/build"
-+qmake-qt5 ..
- make
- echo "***********************************************"
- echo "* *"
- echo "* Translations ................. *"
- echo "* *"
- echo "***********************************************"
--lrelease kndiswrapper.pro
-+
-+#lrelease ../kndiswrapper.pro
-+cp -r "$basedir/translations" "$basedir/build"
-+lrelease-qt5 "$basedir/build/translations"/*.ts
- echo "***********************************************"
- echo "* *"
- echo "* installing ................... *"
- echo "* *"
- echo "***********************************************"
--if [ ! -e /usr/share/kndiswrapper ];
--then
-- mkdir -p /usr/share/kndiswrapper
--fi
-
--echo "cp icons/kndiswrapper.xpm /usr/share/kndiswrapper" && cp icons/kndiswrapper.xpm /usr/share/kndiswrapper/kndiswrapper.xpm
--echo "cp kndiswrapper /usr/sbin" && cp kndiswrapper /usr/sbin
--chown root:root /usr/sbin/kndiswrapper
--chmod 755 /usr/sbin/kndiswrapper
--echo "cp translations/*.qm /usr/share/kndiswrapper" && cp translations/*.qm /usr/share/kndiswrapper
--echo "cp translations/cards_known_to_work.txt /usr/share/kndiswrapper" && cp translations/cards_known_to_work.txt /usr/share/kndiswrapper
--cat > /usr/share/applications/kndiswrapper.desktop <<EOF
-+mkdir -p ${1}/usr/share/{kndiswrapper,applications,pixmaps}
-+mkdir -p ${1}/usr/bin
-+
-+echo "cp icons/kndiswrapper.xpm ${1}/usr/share/kndiswrapper"
-+cp "$basedir/icons/kndiswrapper.xpm" ${1}/usr/share/kndiswrapper/kndiswrapper.xpm
-+echo "cp icons/kndiswrapper.xpm ${1}/usr/share/pixmaps"
-+cp "$basedir/icons/kndiswrapper.xpm" ${1}/usr/share/pixmaps/kndiswrapper.xpm
-+echo "cp kndiswrapper ${1}/usr/bin" && cp kndiswrapper ${1}/usr/bin
-+#chown root:root ${1}/usr/bin/kndiswrapper
-+chmod 755 ${1}/usr/bin/kndiswrapper
-+echo "cp translations/build/*.qm ${1}/usr/share/kndiswrapper"
-+cp "$basedir/translations/"*.qm ${1}/usr/share/kndiswrapper
-+echo "cp translations/cards_known_to_work.txt ${1}/usr/share/kndiswrapper"
-+cp "$basedir/translations/cards_known_to_work.txt" ${1}/usr/share/kndiswrapper
-+cat > ${1}/usr/share/applications/kndiswrapper.desktop <<EOF
- [Desktop Entry]
- Encoding=UTF-8
- Name=kndiswrapper
-@@ -52,7 +62,7 @@
- Comment=A GUI for ndiswrapper
- Comment[de]=Eine GUI fuer ndiswrapper.
- Exec=/usr/bin/kndiswrapper
--Icon=/usr/share/kndiswrapper/kndiswrapper.png
-+Icon=kndiswrapper
- Terminal=false
- Type=Application
- StartupNotify=true
-diff -Naur a/kndiswrapper.pro b/kndiswrapper.pro
---- a/kndiswrapper.pro 2012-03-06 15:44:43.000000000 +0800
-+++ b/kndiswrapper.pro 2015-12-09 17:16:50.755868557 +0800
-@@ -4,7 +4,7 @@
- #
- #-------------------------------------------------
-
--QT += core gui
-+QT += core gui widgets
-
- TARGET = kndiswrapper
- TEMPLATE = app
-diff -Naur a/src/kndiswrapper.cpp b/src/kndiswrapper.cpp
---- a/src/kndiswrapper.cpp 2012-03-06 15:44:43.000000000 +0800
-+++ b/src/kndiswrapper.cpp 2015-12-09 18:02:43.402730822 +0800
-@@ -1,7 +1,8 @@
- #include "kndiswrapper.h"
--#include <klocale.h>
-+#include <QDebug>
-+#include <unistd.h>
- //
--kndiswrapper::kndiswrapper( QWidget * parent, Qt::WFlags f) : QDialog(parent, f)
-+kndiswrapper::kndiswrapper( QWidget * parent, Qt::WindowFlags f) : QDialog(parent, f)
- {
- //setupUi(this);
-
-@@ -35,19 +36,35 @@
- disablenetconf=false;
- invokeSetup=false;
- debug=false;
-- if (qApp->argc() > 1){
-- for (int i=0; i < qApp->argc();i++){
-- if ((QString)qApp->argv()[i] == "--disablerootcheck") disablerootcheck=true;
-- if ((QString)qApp->argv()[i] == "--setup") invokeSetup=true;
-- if ((QString)qApp->argv()[i] == "--disablenetconf") disablenetconf=true;
-- if ((QString)qApp->argv()[i] == "--debug") debug=true;
-+ if (QCoreApplication::arguments().count() > 1){
-+ for (int i=0; i < QCoreApplication::arguments().count();i++){
-+ if ((QString)QCoreApplication::arguments()[i] == "--disablerootcheck") disablerootcheck=true;
-+ if ((QString)QCoreApplication::arguments()[i] == "--setup") invokeSetup=true;
-+ if ((QString)QCoreApplication::arguments()[i] == "--disablenetconf") disablenetconf=true;
-+ if ((QString)QCoreApplication::arguments()[i] == "--debug") debug=true;
- }
- }
-
-- QString rootcheck = (QString)getenv("HOME");
-- if (rootcheck != "/root"){
-+ if (getuid() != 0){
- if (!disablerootcheck){
-- QMessageBox::information(this,"DEBUG","You have to be root to run this programm.\nTry --disablerootcheck for testing.");
-+ QStringList SuCandidates;
-+ QString SuCmd;
-+ SuCandidates << "kdesu" << "gksu" << "kdesudo" << "gksudo";
-+ for (int i=0;i<SuCandidates.count();++i) {
-+ QString rval;
-+ rval = QStandardPaths::findExecutable(SuCandidates[i]);
-+ if (QFileInfo(rval).isExecutable()) {
-+ SuCmd = SuCandidates[i];
-+ break;
-+ }
-+ }
-+ if (SuCmd != QString()) {
-+ QProcess process;
-+ process.startDetached(SuCmd+QString(" ")+QCoreApplication::applicationFilePath());
-+ //process.waitForFinished(-1);
-+ } else {
-+ QMessageBox::information(this,"DEBUG","You have to be root to run this programm.\nTry --disablerootcheck for testing.");
-+ }
- exit(0);
- }
- }
-@@ -173,9 +190,9 @@
- QString launcher;
- launcher = "kdesu ";
- launcher = launcher + "\"kndiswrapper ";
-- if (qApp->argc() > 1){
-- for (int i=1; i < qApp->argc();i++){
-- launcher = launcher + (QString)qApp->argv()[i] + " ";
-+ if (QCoreApplication::arguments().count() > 1){
-+ for (int i=1; i < QCoreApplication::arguments().count();i++){
-+ launcher = launcher + (QString)QCoreApplication::arguments()[i] + " ";
- }
- }
- launcher = launcher + "\" &";
-diff -Naur a/src/kndiswrapper.h b/src/kndiswrapper.h
---- a/src/kndiswrapper.h 2012-03-06 15:44:43.000000000 +0800
-+++ b/src/kndiswrapper.h 2015-12-09 17:43:30.160769769 +0800
-@@ -19,6 +19,7 @@
- #include <QFont>
- #include <QDir>
- #include <QAction>
-+#include <QStandardPaths>
- //#include <cstdlib>
- //#include <cstring>
- #include "ui_kndiswrapper.h"
-@@ -26,7 +27,7 @@
- class kndiswrapper : public QDialog, public Ui::kndiswrapper{
- Q_OBJECT
- public:
-- kndiswrapper(QWidget * parent = 0, Qt::WFlags f = 0);
-+ kndiswrapper(QWidget * parent = 0, Qt::WindowFlags f = 0);
- virtual ~kndiswrapper();
-
- private: