Commit 970b3bc9d7aefa6641d89e99677762dbe00912fa

Authored by Josh Klontz
1 parent e1d2868d

a simpler alternative to sockets

sdk/core/qtutils.cpp
... ... @@ -106,6 +106,8 @@ void QtUtils::writeFile(const QString &file, const QByteArray &data, int compres
106 106 const QByteArray contents = (compression == 0) ? data : qCompress(data, compression);
107 107 if (baseName == "terminal") {
108 108 printf("%s", qPrintable(contents));
  109 + } else if (baseName == "buffer") {
  110 + Globals->buffer = data;
109 111 } else {
110 112 QFile f(file);
111 113 touchDir(f);
... ...
sdk/openbr_plugin.h
... ... @@ -513,6 +513,12 @@ public:
513 513 Q_PROPERTY(bool noDuplicates READ get_noDuplicates WRITE set_noDuplicates RESET reset_noDuplicates)
514 514 BR_PROPERTY(bool, noDuplicates, false)
515 515  
  516 + /*!
  517 + * \brief File output is redirected here if the file's basename is 'buffer', clearing previous contents.
  518 + */
  519 + Q_PROPERTY(QByteArray buffer READ get_buffer WRITE set_buffer RESET reset_buffer)
  520 + BR_PROPERTY(QByteArray, buffer, QByteArray())
  521 +
516 522 QHash<QString,QString> abbreviations; /*!< \brief Used by br::Transform::make() to expand abbreviated algorithms into their complete definitions. */
517 523 QHash<QString,int> classes; /*!< \brief Used by classifiers to associate text class labels with unique integers IDs. */
518 524 QTime startTime; /*!< \brief Used to estimate timeRemaining(). */
... ...