~ubuntu-branches/debian/experimental/qtcurve/experimental

« back to all changes in this revision

Viewing changes to lib/utils/process.h

  • Committer: Package Import Robot
  • Author(s): Boris Pek, Thanks to Scarlett Clark
  • Date: 2015-07-26 04:17:05 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150726041705-yuxbierbpely1fvp
Tags: 1.8.18+git20150711-a3fff13-1
* Upstream Git snapshot (1.8.18-242-ga3fff13) is taken from:
  http://quickgit.kde.org/?p=qtcurve.git
* Localization files are taken from last stable release (1.8.18).
* Fixed in upstream:
  - gtk2-engines-qtcurve: inkscape 0.91 crashes after palette mouse-over
    (Closes: #786831)
  - gtk2-engines-qtcurve: massive memory leak in mysql-workbench
    (Closes: #682162)
* Update debian/patches:
  - delete qt53-build-fix.diff (fixed in upstream)
  - add enable-translations.patch
* Update debian/control:
  - bump Standards-Version to 3.9.6 (was 3.9.5): no changes required
  - update Build-Depends for transition from KDE4 to KF5:
    + delete dependencies from: kdebase-workspace-dev and qtdeclarative5-dev
    + add dependencies from: extra-cmake-modules, kio-dev,
      libkf5archive-dev, libkf5config-dev, libkf5configwidgets-dev,
      libkf5i18n-dev, libkf5kdelibs4support-dev, libkf5widgetsaddons-dev,
      libkf5xmlgui-dev, libqt5x11extras5-dev, libxcb1-dev, pkg-config
      [Thanks to Scarlett Clark]
  - delete package kwin-style-qtcurve: it is not available for KF5 yet
    (LP: #1452218)
  - package kde-style-qtcurve now provides package kde-style-qtcurve-qt4
  - package kde-style-qtcurve is "Multi-Arch: same" now
  - metapackage qtcurve now depends on kde-style-qtcurve-qt5 and recommends
    kwin-decoration-oxygen, oxygen-icon-theme and oxygencursors
* Update debian/rules:
  - build using kf5 libraries instead of kde4
  - update configure flags
  - use xz compression in packages
* Update debian/kde-style-qtcurve.install:
  there are no KDE4 related files anymore.
* Update debian/kde-style-qtcurve-qt5.install.
* Update debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
 
 *   Copyright 2014 - 2014 Yichao Yu <yyc1992@gmail.com>                     *
 
2
 *   Copyright 2014 - 2015 Yichao Yu <yyc1992@gmail.com>                     *
3
3
 *                                                                           *
4
4
 *   This program is free software; you can redistribute it and/or modify    *
5
5
 *   it under the terms of the GNU Lesser General Public License as          *
24
24
 
25
25
#include "utils.h"
26
26
 
27
 
QTC_BEGIN_DECLS
28
 
 
29
 
bool qtcForkBackground(QtcCallback cb, void *data, QtcCallback fail_cb);
30
 
#define qtcForkBackground(cb, data, fail_cb...)                 \
31
 
    qtcForkBackground(cb, data, QTC_DEFAULT(fail_cb, NULL))
 
27
bool qtcForkBackground(QtcCallback cb, void *data, QtcCallback fail_cb=nullptr);
32
28
bool qtcSpawn(const char *file, const char *const *argv,
33
 
              QtcCallback cb, void *cb_data, QtcCallback fail_cb);
34
 
#define qtcSpawn(file, argv, cb, cb_data, fail_cb...)                   \
35
 
    qtcSpawn(file, argv, cb, cb_data, QTC_DEFAULT(fail_cb, NULL))
 
29
              QtcCallback cb, void *cb_data, QtcCallback fail_cb=nullptr);
36
30
typedef enum {
37
31
    QTC_POPEN_NONE = 0,
38
32
    QTC_POPEN_READ = 1 << 0,
58
52
qtcPopenStdout(const char *file, const char *const *argv,
59
53
               int timeout, size_t *len)
60
54
{
61
 
    QtcPopenBuff popen_buff = {1, QTC_POPEN_READ, NULL, 0};
 
55
    QtcPopenBuff popen_buff = {1, QTC_POPEN_READ, nullptr, 0};
62
56
    bool res = qtcPopenBuff(file, argv, 1, &popen_buff, timeout);
63
 
    QTC_RET_IF_FAIL(res, NULL);
64
57
    qtcAssign(len, popen_buff.len);
 
58
    QTC_RET_IF_FAIL(res, nullptr);
 
59
    if (!popen_buff.len) {
 
60
        free(popen_buff.buff);
 
61
        return nullptr;
 
62
    }
 
63
    popen_buff.buff[popen_buff.len] = '\0';
65
64
    return popen_buff.buff;
66
65
}
67
66
 
68
 
QTC_END_DECLS
69
 
 
70
67
#endif