コード例 #1
0
ファイル: XMLHttpRequest.cpp プロジェクト: st3fan/webkit
void XMLHttpRequest::send(ArrayBuffer* body, ExceptionCode& ec)
{
    String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.");
    scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, consoleMessage);

    sendBytesData(body->data(), body->byteLength(), ec);
}
コード例 #2
0
png2gifs_gui::png2gifs_gui(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::png2gifs_gui)
{
    ui->setupUi(this);
    connect(&proc, SIGNAL(readyReadStandardOutput()),this, SLOT(consoleMessage()) );
}
コード例 #3
0
void XMLHttpRequest::send(ArrayBuffer* body, ExceptionCode& ec)
{
    String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.");
    scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, consoleMessage);

    HistogramSupport::histogramEnumeration("WebCore.XHR.send.ArrayBufferOrView", XMLHttpRequestSendArrayBuffer, XMLHttpRequestSendArrayBufferOrViewMax);

    sendBytesData(body->data(), body->byteLength(), ec);
}
コード例 #4
0
void PythonQtScriptingConsole::stdOut(const QString& s)
{
  _stdOut += s;
  int idx;
  while((idx = _stdOut.indexOf('\n'))!=-1) {
    consoleMessage(_stdOut.left(idx));
    std::cout << _stdOut.left(idx).toLatin1().data() << std::endl;
    _stdOut = _stdOut.mid(idx+1);
  }
}
コード例 #5
0
void PythonQtScriptingConsole::stdErr(const QString& s)
{
  _hadError = true;
  _stdErr += s;
  int idx;
  while((idx = _stdErr.indexOf('\n'))!=-1) {
    consoleMessage(_stdErr.left(idx));
    std::cerr << _stdErr.left(idx).toLatin1().data() << std::endl;
    _stdErr = _stdErr.mid(idx+1);
  }
}
コード例 #6
0
ファイル: scannar.cpp プロジェクト: sheenaVerghese/GitBackUp
string scannar::returnToGUI(){
    err=new error();

   int getMsg= splitStr();
   if(getMsg==0&&tokenize.size()>0){
      parse= new parser();
      getMsg= parse->startParsing(tokenize);
   }
   return consoleMessage(getMsg);

}
コード例 #7
0
ファイル: XMLHttpRequest.cpp プロジェクト: Igalia/blink
void XMLHttpRequest::send(ArrayBuffer* body, ExceptionState& exceptionState)
{
    WTF_LOG(Network, "XMLHttpRequest %p send() ArrayBuffer %p", this, body);

    String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.");
    executionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, consoleMessage);

    blink::Platform::current()->histogramEnumeration("WebCore.XHR.send.ArrayBufferOrView", XMLHttpRequestSendArrayBuffer, XMLHttpRequestSendArrayBufferOrViewMax);

    sendBytesData(body->data(), body->byteLength(), exceptionState);
}
コード例 #8
0
ファイル: TextTrackLoader.cpp プロジェクト: mirror/chromium
void TextTrackLoader::corsPolicyPreventedLoad(SecurityOrigin* securityOrigin,
                                              const KURL& url) {
  String consoleMessage(
      "Text track from origin '" + SecurityOrigin::create(url)->toString() +
      "' has been blocked from loading: Not at same origin as the document, "
      "and parent of track element does not have a 'crossorigin' attribute. "
      "Origin '" +
      securityOrigin->toString() + "' is therefore not allowed access.");
  document().addConsoleMessage(ConsoleMessage::create(
      SecurityMessageSource, ErrorMessageLevel, consoleMessage));
  m_state = Failed;
}
コード例 #9
0
void V8ConsoleMessage::handler(v8::Handle<v8::Message> message, v8::Handle<v8::Value> data)
{
    // Use the frame where JavaScript is called from.
    Frame* frame = V8Proxy::retrieveFrameForEnteredContext();
    if (!frame)
        return;
    Page* page = frame->page();
    if (!page)
        return;

    v8::Handle<v8::String> errorMessageString = message->Get();
    ASSERT(!errorMessageString.IsEmpty());
    String errorMessage = toWebCoreString(errorMessageString);

    v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
    bool useURL = resourceName.IsEmpty() || !resourceName->IsString();
    String resourceNameString = useURL ? frame->document()->url() : toWebCoreString(resourceName);
    V8ConsoleMessage consoleMessage(errorMessage, resourceNameString, message->GetLineNumber());
    consoleMessage.dispatchNow(page);
}
コード例 #10
0
void png2gifs_gui::on_startTool_clicked()
{
    if(ui->inputDir->text().isEmpty())
    {
        QMessageBox::warning(this, tr("Source directory is not set"), tr("Please, set the source directory"), QMessageBox::Ok);
        return;
    }

    QString command;

    #ifdef _WIN32
    command = ApplicationPath+"/PNG2GIFs.exe";
    #else
    command = ApplicationPath+"/PNG2GIFs";
    #endif

    if(!QFile(command).exists())
    {
        QMessageBox::warning(this, tr("Tool is not found"), tr("Can't run application: \n%1\nPlease, check the application directory.").arg(command), QMessageBox::Ok);
        return;
    }

    QStringList args;
    if(ui->WalkSubDirs->isChecked()) args << "-W";
    if(ui->RemoveSource->isChecked()) args << "-R";
    args << "--nopause";
    args << ui->inputDir->text();
    if(!ui->outputDir->text().isEmpty()) args << QString("-O%1").arg(ui->outputDir->text());


    DevConsole::show();
    DevConsole::log("Ready>>>", "PNG2GIFs");
    DevConsole::log("----------------------------------", "PNG2GIFs", true);
    proc->waitForFinished(1);
    proc->start(command, args);
    connect(proc, SIGNAL(readyReadStandardOutput()),this, SLOT(consoleMessage()) );
    //connect(proc, SIGNAL(readyReadStandardError()), this, SLOT(consoleMessage()) );
}
コード例 #11
0
ファイル: mainwindow.cpp プロジェクト: jrosser/honeymon
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    console = new Console;
    console->setEnabled(false);

    tabs = new QTabWidget();
    setCentralWidget(tabs);

    serial = new QSerialPort(this);
    settings = new SettingsDialog;

    ui->actionConnect->setEnabled(true);
    ui->actionDisconnect->setEnabled(false);
    ui->actionQuit->setEnabled(true);
    ui->actionConfigure->setEnabled(true);
    ui->actionAscii->setEnabled(true);
    ui->actionBinary->setEnabled(true);

    nodeNames = new NodeNames();
    logFile = new LogFile();

    decoder = new Decoder();
    connect(decoder, SIGNAL(logMessage(QString)), logFile, SLOT(add(QString)));

    tempDistModel = new TempModel(this);
    tempDistModel->setNodeNameHelper(nodeNames);

    zoneSetpointModel = new SetpointModel(this);
    zoneSetpointModel->setNodeNameHelper(nodeNames);

    demandModel = new DemandModel(this);
    demandModel->setNodeNameHelper(nodeNames);

    commandModel = new CommandModel(this);
    commandModel->setNodeNameHelper(nodeNames);

    nowNextModel = new ProgNowNextModel(this);
    nowNextModel->setNodeNameHelper(nodeNames);

    unknown1060Model = new Unknown18Model(this);
    unknown1060Model->setNodeNameHelper(nodeNames);

    unknown1100Model = new Unknown16Model(this);
    unknown1100Model->setNodeNameHelper(nodeNames);

    unknown0008Model = new Unknown16Model(this);
    unknown0008Model->setNodeNameHelper(nodeNames);

    unknown0009Model = new Unknown16Model(this);
    unknown0009Model->setNodeNameHelper(nodeNames);

    unknown1F09Model = new Unknown16Model(this);
    unknown1F09Model->setNodeNameHelper(nodeNames);

    unknown3B00Model = new Unknown16Model(this);
    unknown3B00Model->setNodeNameHelper(nodeNames);

    messageModel = new MessageModel(this);

    MessageTab *messageTab = new MessageTab();
    messageTab->setMessageCountersModel(commandModel);
    messageTab->setMessageLogModel(messageModel);
    tabs->addTab(messageTab, "Messages");

    TemperaturesTab *temperaturesTab = new TemperaturesTab();
    temperaturesTab->setMeasuredTempsModel(tempDistModel);
    temperaturesTab->setSetpointsModel(zoneSetpointModel);
    temperaturesTab->setDemandsModel(demandModel);
    temperaturesTab->setProgNowNextModel(nowNextModel);

    tabs->addTab(temperaturesTab, "Temperatures");

    UnknownTab *unknownTab = new UnknownTab();
    unknownTab->set0008Model(unknown0008Model);
    unknownTab->set0009Model(unknown0009Model);
    unknownTab->set1060Model(unknown1060Model);
    unknownTab->set1100Model(unknown1100Model);
    unknownTab->set1F09Model(unknown1F09Model);
    unknownTab->set3B00Model(unknown3B00Model);
    tabs->addTab(unknownTab, "Unknown messages");

    DecoderTab *decoderTab = new DecoderTab();
    tabs->addTab(decoderTab, "Decoder");

    tabs->addTab(console, "Console");

    initActionsConnections();

    parser=NULL;
    setBinaryParser();

    connect(serial, SIGNAL(readyRead()), this, SLOT(readData()));

    connect(decoder, SIGNAL(consoleMessage(QString)), this, SLOT(message(QString)));
    connect(decoder, SIGNAL(gotMessage(QByteArray)), messageModel, SLOT(newData(QByteArray)));

    //connect decoded messages to tables
    connect(decoder, SIGNAL(zoneTempDistribution(quint32,quint32,quint32,float)), tempDistModel, SLOT(newData(quint32,quint32,quint32,float)));
    connect(decoder, SIGNAL(zoneSetpointSetting(quint32,quint32,quint32,float)), zoneSetpointModel, SLOT(newData(quint32,quint32,quint32,float)));
    connect(decoder, SIGNAL(heatDemand(quint32,quint32,quint32,quint32)), demandModel, SLOT(newData(quint32, quint32, quint32, quint32)));
    connect(decoder, SIGNAL(gotCommand(quint32,quint32,quint32)), commandModel, SLOT(newData(quint32,quint32,quint32)));
    connect(decoder, SIGNAL(programmerNowNext(quint32,quint32,float,float,quint32)), nowNextModel, SLOT(newData(quint32, quint32, float, float, quint32)));

    //connect unknown messages to tables
    connect(decoder, SIGNAL(unknown1060(quint32,quint32,QByteArray)), unknown1060Model, SLOT(newData(quint32,quint32,QByteArray)));
    connect(decoder, SIGNAL(unknown1100(quint32,QByteArray)), unknown1100Model, SLOT(newData(quint32,QByteArray)));
    connect(decoder, SIGNAL(unknown0008(quint32,QByteArray)), unknown0008Model, SLOT(newData(quint32,QByteArray)));
    connect(decoder, SIGNAL(unknown0009(quint32,QByteArray)), unknown0009Model, SLOT(newData(quint32,QByteArray)));
    connect(decoder, SIGNAL(unknown1F09(quint32,QByteArray)), unknown1F09Model, SLOT(newData(quint32,QByteArray)));
    connect(decoder, SIGNAL(unknown3B00(quint32,QByteArray)), unknown3B00Model, SLOT(newData(quint32,QByteArray)));

    //connect decoder stats to decoder tab
    connect(decoder, SIGNAL(inputByteCount(quint32)), decoderTab, SLOT(inputByteCount(quint32)));
    connect(decoder, SIGNAL(candidatePayloadCount(quint32)), decoderTab, SLOT(candidatePayloadCount(quint32)));
    connect(decoder, SIGNAL(overLengthMessageCount(quint32)), decoderTab, SLOT(overLengthMessageCount(quint32)));
    connect(decoder, SIGNAL(lengthOddCount(quint32)), decoderTab, SLOT(lengthOddCount(quint32)));
    connect(decoder, SIGNAL(manchesterInvalidCount(quint32)), decoderTab, SLOT(manchesterInvalidCount(quint32)));
    connect(decoder, SIGNAL(validMessageCount(quint32)), decoderTab, SLOT(validMessageCount(quint32)));

    //connect decoded messages to influxdb
    connect(decoder, SIGNAL(influxData(QString)), this, SLOT(writeInflux(QString)));

    //receive broadcast traffic from RF receiver
    udpSocket = new QUdpSocket(this);
    udpSocket->bind(8888, QUdpSocket::ShareAddress);

    connect(udpSocket, SIGNAL(readyRead()),
            this, SLOT(readPendingDatagrams()));

    //send influx format data
    influxSocket = new QUdpSocket(this);
}
コード例 #12
0
ファイル: loginform.cpp プロジェクト: smandava/cuteflix
void JsConsoleWebPage::javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID)
{
    qDebug() << message << lineNumber << sourceID;
    emit consoleMessage(message);
}
コード例 #13
0
ファイル: XMLHttpRequest.cpp プロジェクト: ollie314/webkit
ExceptionOr<void> XMLHttpRequest::send(ArrayBuffer& body)
{
    ASCIILiteral consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.");
    scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, consoleMessage);
    return sendBytesData(body.data(), body.byteLength());
}
コード例 #14
0
png2gifs_gui::~png2gifs_gui()
{
    disconnect(&proc, SIGNAL(readyReadStandardOutput()),this, SLOT(consoleMessage()) );
    delete ui;
}
コード例 #15
0
ファイル: IPC.c プロジェクト: aosm/Startup
static void* handleIPCMessage (void* aMsgParam, CFIndex aMessageSize, CFAllocatorRef anAllocator, void* aMachPort)
{
    SystemStarterIPCMessage*     aMessage = (SystemStarterIPCMessage*) aMsgParam;
    SystemStarterIPCMessage*     aReplyMessage = NULL;
    
    CFDataRef aResult = NULL;
    CFDataRef aData = NULL;

    if (aMessage->aHeader.msgh_bits & MACH_MSGH_BITS_COMPLEX)
      {
        warning(CFSTR("Ignoring out-of-line IPC message.\n"));
        return NULL;
      }
    else
      {
        mach_msg_security_trailer_t* aSecurityTrailer = (mach_msg_security_trailer_t*)
        ((uint8_t*)aMessage + round_msg(sizeof(SystemStarterIPCMessage) + aMessage->aByteLength));

        /* CFRunLoop includes the format 0 message trailer with the passed message. */
        if (aSecurityTrailer->msgh_trailer_type == MACH_MSG_TRAILER_FORMAT_0 &&
            aSecurityTrailer->msgh_sender.val[0] != 0)
          {
            warning(CFSTR("Ignoring IPC message sent from uid %d\n."), aSecurityTrailer->msgh_sender.val[0]);
            return NULL;
          }
      }

    if (aMessage->aProtocol != kIPCProtocolVersion)
      {
        warning(CFSTR("Unsupported IPC protocol version number: %d.  Message ignored.\n"), aMessage->aProtocol);
        return NULL;
      }

    aData = CFDataCreateWithBytesNoCopy(NULL,
                                        (uint8_t*)aMessage + sizeof(SystemStarterIPCMessage),
                                        aMessage->aByteLength,
                                        kCFAllocatorNull);
    /*
     * Dispatch the IPC message.
     */
    if (aData)
      {
        StartupContext	aStartupContext = NULL;
        CFStringRef	anErrorString   = NULL;
        CFDictionaryRef	anIPCMessage    = (CFDictionaryRef) CFPropertyListCreateFromXMLData(NULL, aData, kCFPropertyListImmutable, &anErrorString);
        
        if (gDebugFlag == 2) debug(CFSTR("\nIPC message = %@\n"), anIPCMessage);

        if (aMachPort)
          {
            CFMachPortContext aMachPortContext;
            CFMachPortGetContext((CFMachPortRef)aMachPort, &aMachPortContext);
            aStartupContext = (StartupContext)aMachPortContext.info;
          }
        
        if (anIPCMessage && CFGetTypeID(anIPCMessage) == CFDictionaryGetTypeID())
          {
            /* switch on the type of the IPC message */
            CFStringRef anIPCMessageType = CFDictionaryGetValue(anIPCMessage, kIPCMessageKey);
            if (anIPCMessageType && CFGetTypeID(anIPCMessageType) == CFStringGetTypeID())
              {
                if (CFEqual(anIPCMessageType, kIPCConsoleMessage))
                  {
                    consoleMessage(aStartupContext, anIPCMessage);
                  }
                else if (CFEqual(anIPCMessageType, kIPCStatusMessage))
                  {
                    statusMessage(aStartupContext, anIPCMessage);
                  }
                else if (CFEqual(anIPCMessageType, kIPCQueryMessage))
                  {
                    aResult = queryConfigSetting(aStartupContext, anIPCMessage);
                  }
                else if (CFEqual(anIPCMessageType, kIPCLoadDisplayBundleMessage))
                  {
                    loadDisplayBundle(aStartupContext, anIPCMessage);
                  }
                else if (CFEqual(anIPCMessageType, kIPCUnloadDisplayBundleMessage))
                  {
                    unloadDisplayBundle(aStartupContext, anIPCMessage);
                  }
              }
          }
        else
          {
            error(CFSTR("Unable to parse IPC message: %@\n"), anErrorString);
          }
        CFRelease(aData);
      }
    else
      {
        error(CFSTR("Out of memory.  Could not allocate space for IPC message.\n"));
      }

    /*
     * Generate a Mach message for the result data.
     */
    if (!aResult) aResult = CFDataCreateWithBytesNoCopy(NULL, "", 1, kCFAllocatorNull);
    if (aResult)
    {
        CFIndex aDataSize = CFDataGetLength(aResult);
        CFIndex aReplyMessageSize = round_msg(sizeof(SystemStarterIPCMessage) + aDataSize + 3);
        aReplyMessage = CFAllocatorAllocate(kCFAllocatorSystemDefault, aReplyMessageSize, 0);
        if (aReplyMessage)
          {
            aReplyMessage->aHeader.msgh_id = -1 * (SInt32)aMessage->aHeader.msgh_id;
            aReplyMessage->aHeader.msgh_size = aReplyMessageSize;
            aReplyMessage->aHeader.msgh_remote_port = aMessage->aHeader.msgh_remote_port;
            aReplyMessage->aHeader.msgh_local_port = MACH_PORT_NULL;
            aReplyMessage->aHeader.msgh_reserved = 0;
            aReplyMessage->aHeader.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_MOVE_SEND_ONCE, 0);
            aReplyMessage->aBody.msgh_descriptor_count = 0;
            aReplyMessage->aProtocol = kIPCProtocolVersion;
            aReplyMessage->aByteLength = CFDataGetLength(aResult);
            memmove((uint8_t*)aReplyMessage + sizeof(SystemStarterIPCMessage),
                    CFDataGetBytePtr(aResult),
                    CFDataGetLength(aResult));
          }
        CFRelease(aResult);
    }
    if (!aReplyMessage)
      {
        error(CFSTR("Out of memory.  Could not allocate IPC result.\n"));
      }
    return aReplyMessage;
}