diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-10 16:16:32 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-10 16:16:32 -0500 |
commit | 02dc85a95b228b7242b0d11ea35619faad96db03 (patch) | |
tree | e161ba877a0720bbdf7818bdec06eb239d8ad271 /ubuntu/precise/tdelibs/debian/patches/kubuntu_19_debianize_useragent.diff | |
parent | 6f2c7dc70e77d2f768d687838b6cc9f7632f609e (diff) | |
download | tde-packaging-02dc85a95b228b7242b0d11ea35619faad96db03.tar.gz tde-packaging-02dc85a95b228b7242b0d11ea35619faad96db03.zip |
Split precise from maverick
Diffstat (limited to 'ubuntu/precise/tdelibs/debian/patches/kubuntu_19_debianize_useragent.diff')
-rw-r--r-- | ubuntu/precise/tdelibs/debian/patches/kubuntu_19_debianize_useragent.diff | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ubuntu/precise/tdelibs/debian/patches/kubuntu_19_debianize_useragent.diff b/ubuntu/precise/tdelibs/debian/patches/kubuntu_19_debianize_useragent.diff new file mode 100644 index 000000000..715b2bd22 --- /dev/null +++ b/ubuntu/precise/tdelibs/debian/patches/kubuntu_19_debianize_useragent.diff @@ -0,0 +1,39 @@ +--- a/kio/kio/kprotocolmanager.cpp ++++ b/kio/kio/kprotocolmanager.cpp +@@ -450,14 +450,19 @@ + return d->useragent; + + TQString supp; ++ int debian_append = 0; + struct utsname nam; + if( uname(&nam) >= 0 ) + { + if( modifiers.contains('o') ) + { + supp += TQString("; %1").arg(nam.sysname); ++ debian_append = 1; + if ( modifiers.contains('v') ) ++ { + supp += TQString(" %1").arg(nam.release); ++ debian_append = 2; ++ } + } + if( modifiers.contains('p') ) + { +@@ -485,6 +490,16 @@ + } + d->modifiers = modifiers; + d->useragent = CFG_DEFAULT_UAGENT(supp); ++ ++ if (debian_append == 1) ++ d->useragent.append(" (Debian)"); ++ else if (debian_append == 2) ++ { ++#define STRINGIFY(macro_or_string) STRINGIFY_ARG(macro_or_string) ++#define STRINGIFY_ARG(contents) #contents ++ d->useragent.append(" (Debian package " STRINGIFY(DEBIAN_VERSION) ")"); ++ } ++ + return d->useragent; + } + |