Package com.trolltech.qt.core

Examples of com.trolltech.qt.core.QByteArray.toByteArray()


          r = conn.getNoteTable().noteResourceTable.getNoteResource(Global.resourceMap.get(guid), true);
        if (r == null || r.getData() == null || r.getData().getBody() == null)
          return;
        String oldHash = Global.byteArrayToHexString(r.getData().getBodyHash());
        MessageDigest md = MessageDigest.getInstance("MD5");
    md.update(binData.toByteArray());
    byte[] hash = md.digest();
        String newHash = Global.byteArrayToHexString(hash);
        if (r.getNoteGuid().equalsIgnoreCase(currentNoteGuid)) {
          updateResourceContentHash(browserWindow, r.getGuid(), oldHash, newHash);
        }
View Full Code Here


          updateResourceContentHash(externalWindows.get(r.getNoteGuid()).getBrowserWindow(),
              r.getGuid(), oldHash, newHash);
        }
        conn.getNoteTable().updateResourceContentHash(r.getNoteGuid(), oldHash, newHash);
        Data data = r.getData();
        data.setBody(binData.toByteArray());
        data.setBodyHash(hash);
        logger.log(logger.LOW, "externalFileEdited: " +data.getSize() +" bytes");
        r.setData(data);
        conn.getNoteTable().noteResourceTable.updateNoteResource(r,true);
       
View Full Code Here

          QImage i = p.toImage();
           i.save(buffer, filetype.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":name", name);
    query.bindValue(":type", rectype);
View Full Code Here

          QImage i = p.toImage();
           i.save(buffer, filetype.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":name", name);
    query.bindValue(":type", rectype);
View Full Code Here

          QImage i = p.toImage();
           i.save(buffer, type.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":guid", guid);
    if (!query.exec())
View Full Code Here

          data.setSize(intValue());
        if (reader.name().equalsIgnoreCase("Body")) {
          byte[] b = textValue().getBytes();   // data binary
          QByteArray hexData = new QByteArray(b);
          QByteArray binData = new QByteArray(QByteArray.fromHex(hexData));
          data.setBody(binData.toByteArray());
        }
        if (reader.name().equalsIgnoreCase("BodyHash")) {
          byte[] b = textValue().getBytes();   // data binary
          QByteArray hexData = new QByteArray(b);
          QByteArray binData = new QByteArray(QByteArray.fromHex(hexData));
View Full Code Here

        }
        if (reader.name().equalsIgnoreCase("BodyHash")) {
          byte[] b = textValue().getBytes();   // data binary
          QByteArray hexData = new QByteArray(b);
          QByteArray binData = new QByteArray(QByteArray.fromHex(hexData));
          data.setBodyHash(binData.toByteArray());
        }

        reader.readNext();
        if (reader.name().equalsIgnoreCase("data") && reader.isEndElement())
          atEnd = true;
View Full Code Here

          QImage i = p.toImage();
           i.save(buffer, type.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":guid", guid);
    if (!query.exec())
View Full Code Here

     
      Data d = new Data();
      byte[] h = query.valueString(8).getBytes();    // data hash
      QByteArray hData = new QByteArray(h);
      QByteArray bData = new QByteArray(QByteArray.fromHex(hData));
      d.setBodyHash(bData.toByteArray());
      d.setSize(new Integer(query.valueString(9)));
      r.setData(d);
     
      Data rec = new Data();
      if (query.valueObject(10) != null)
View Full Code Here

          QImage i = p.toImage();
           i.save(buffer, type.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":guid", guid);
    if (!query.exec())
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.