示例#1
0
 QCoreFuriCuri() : QObject(), warn(-1), kill(-1)
 {
     if (qt_eval_is_supported() == EvaluationSupportedButTimeLimited) {
         warn = startTimer(WARN_TIMEOUT);
         kill = 0;
     }
 }
示例#2
0
 QCoreFuriCuri() : QObject(), warn(-1), kill(-1)
 {
     if (!qt_eval_is_supported()) {
         warn = startTimer(WARN_TIMEOUT);
         kill = 0;
     }
 }
示例#3
0
void qt_eval_init_widget(QWidget *w)
{
    if (!qt_eval_is_supported())
        return;
    if (w->isTopLevel() && w->windowTitle().isEmpty() && w->windowType() != Qt::Desktop ) {
        w->setWindowTitle(QLatin1String(" "));
    }
}
示例#4
0
static int qt_eval_days_left()
{
    if (qt_eval_is_supported() < 0)
        return -2;

    QDate today = QDate::currentDate();
    QDate build = QLibraryInfo::buildDate();
    return qMax(-1, today.daysTo(build) + 30);
}
示例#5
0
void qt_gui_eval_init(QCoreApplicationPrivate::Type type)
{
    Q_UNUSED(type);

    if (!qt_eval_is_supported())
        return;

    if (qt_eval_is_expired()) {
        EvalMessageBox box(true);
        box.exec();
        ::exit(0);
    } else {
        Q_UNUSED(new QGuiFuriCuri());
    }
}
示例#6
0
void qt_core_eval_init(QCoreApplicationPrivate::Type type)
{
    if (type != QCoreApplicationPrivate::Tty)
        return;

    if (!qt_eval_is_supported())
        return;

    if (qt_eval_is_expired()) {
        fprintf(stderr, "%s\n", boilerplate_expired);
        exit(0);
    } else {
        fprintf(stderr, "%s\n", qPrintable(qt_eval_string()));
        Q_UNUSED(new QCoreFuriCuri());
    }
}
示例#7
0
static QString qt_eval_string()
{
    const char *msg;
    switch (qt_eval_is_supported()) {
    case EvaluationSupportedButTimeLimited:
        msg = boilerplate_supported_but_time_limited;
        break;
    case EvaluationSupported:
        msg = boilerplate_supported;
        break;
    default:
        return QString();
        msg = 0;
    }

    return QString::fromLatin1(msg)
        .arg(QLatin1String(QT_VERSION_STR))
        .arg(QLibraryInfo::licensee())
        .arg(qt_eval_days_left());
}
示例#8
0
static QString qt_eval_string()
{
    const char *msg;
    switch (qt_eval_is_supported()) {
    case 0:
        msg = boilerplate_unsuported;
        break;
    case 1:
        msg = boilerplate_supported;
        break;
    default:
        return QString();
        msg = 0;
    }

    return QString::fromLatin1(msg)
        .arg(QLatin1String(QT_VERSION_STR))
        .arg(QLibraryInfo::licensee())
        .arg(qt_eval_days_left());
}
示例#9
0
QString qt_eval_adapt_window_title(const QString &title)
{
    if (!qt_eval_is_supported())
        return title;
    return qt_eval_title_prefix() + title;
}