Beispiel #1
0
QColor XmlReader::readColor()
      {
      Q_ASSERT(tokenType() == QXmlStreamReader::StartElement);
      QColor c;
      c.setRed(intAttribute("r"));
      c.setGreen(intAttribute("g"));
      c.setBlue(intAttribute("b"));
      c.setAlpha(intAttribute("a", 255));
      skipCurrentElement();
      return c;
      }
static void debugDownloadError(WRT::Download * download)
{
    int num = intAttribute(download, WRT::LastError);

    const char * error = downloadError(static_cast<QNetworkReply::NetworkError>(num));

    debugDownloadAttribute(download, "DownloadError", error);
}
static void debugDownloadState(WRT::Download * download)
{
    int num = intAttribute(download, WRT::State);

    const char * state = downloadState(num);

    debugDownloadAttribute(download, "DownloadState", state);

}
static void debugDownloadInt(
    WRT::Download * download,
    WRT::DownloadAttribute which,
    const char * name)
{
    int value = intAttribute(download, which);

    debugDownloadAttribute(download, name, value);
}