GoogleFeedHttpRequest* QtGoogleFeedApi::getFindRequest(QString query)
{
    QUrlQuery urlQuery;
    urlQuery.addQueryItem("v", versionString());
    urlQuery.addQueryItem("q", query);

    QUrl url(QtGoogleFeedApi::BaseUrl + "/find");
    url.setQuery(urlQuery);
    return new GoogleFeedHttpRequest(url);
}
Exemplo n.º 2
0
static bool checkQutIMPluginData(const char *data, quint64 *debugId, QString *error)
{
	InfoToken token;
	bool isValidPattern = false;
	bool isValidQutimVersion = false;
	while (scanNextInfoToken(token, data)) {
		if (!qstrncmp("pattern", token.key, token.keyLength)) {
			isValidPattern = !qstrncmp("QUTIM_PLUGIN_VERIFICATION_DATA", token.value, token.valueLength);
			if (!isValidPattern)
				break;
		} else if (!qstrncmp("debugid", token.key, token.keyLength)) {
			if (token.valueLength != 16) {
				*error = QLatin1String("Invalid plugin identification number");
				return false;
			}
			QByteArray data = QByteArray::fromRawData(token.value, token.valueLength);
			QByteArray number = QByteArray::fromHex(data);
			if (number.size() != 8) {
				*error = QLatin1String("Invalid plugin identification number");
				return false;
			}
			*debugId = qFromBigEndian<quint64>(reinterpret_cast<const uchar *>(number.constData()));
		} else if (!qstrncmp("libqutim", token.key, token.keyLength)) {
			isValidQutimVersion = token.valueLength == qstrlen(versionString())
								  && !qstrncmp(versionString(), token.value, token.valueLength);
		}
	}
	if (!isValidPattern)
		*error = QLatin1String("There is no valid qutIM's plugin verification data");
	else if (!isValidQutimVersion)
		*error = QLatin1String("Plugin is built with incompatible libqutim's version");
	return isValidPattern && isValidQutimVersion;
}
Exemplo n.º 3
0
void CheckVersion::downloadFinished(QNetworkReply *networkReply)
{
    QString text = networkReply->readAll().trimmed();

    if (!text.isEmpty())
    {
        QRegExp rx("^(\\d{1,1}.\\d{1,1}.\\d{1,1}.\\d{8,8})");
        if (!QString(text).contains(rx))
        {
            // be quiet
            qDebug() << text;
            return;
        }

        if (text > versionString())
        {
            QString str(tr("<b>New version available.</b><br/><br/>"
                           "Actual version: %1<br/>"
                           "New version: %2<br/><br/>"
                           "URL: <a href=\"http://www.agros2d.org/down/\">http://www.agros2d.org/down/</a>").
                        arg(versionString()).
                        arg(text));

            QMessageBox::information(QApplication::activeWindow(), tr("New version"), str);
        }
        else if (!m_quiet)
        {
            QMessageBox::information(QApplication::activeWindow(), tr("New version"), tr("You are using actual version."));
        }
    }
}
Exemplo n.º 4
0
SimpleAboutDialog::SimpleAboutDialog(QWidget *parent) :
	QDialog(parent),
	ui(new Ui::SimpleAboutDialog)
{
	ui->setupUi(this);
	setAttribute(Qt::WA_DeleteOnClose);
	ui->texteditDevelopers->setHtml(toHtml(PersonInfo::authors(), true));
	QList<PersonInfo> translators = PersonInfo::translators();
	if (translators.isEmpty())
		ui->tabWidget->removeTab(1);
	else
		ui->texteditTranslators->setHtml(toHtml(translators, false));
	ui->labelVersion->setText(QLatin1String(versionString()));
	ui->labelQtVer ->setText(tr("Based on Qt %1 (%2 bit).")
	                         .arg(QLatin1String(qVersion()), QString::number(QSysInfo::WordSize)));
	QFile licenseFile(":/GPL");
	QString license = tr("<div><b>qutIM</b> %1 is licensed under GNU General Public License, version 2"
								" or (at your option) any later version.</div>"
								"<div>qutIM resources such as themes, icons, sounds may come along with a "
								"different license.</div><br><hr><br>");
	// FIXME: Don't want to break translation before release
	license = license.replace("2", "3").arg(versionString());
	if (licenseFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
		license += Qt::escape(QLatin1String(licenseFile.readAll()));
	} else {
		license += QLatin1String("<a href=\"http://www.gnu.org/licenses/gpl-3.0.html\">GPLv3</a>");
	}
	license.replace(QLatin1String("\n\n"), "<br><br>");
	ui->texteditLicense->setHtml(license);
}
void IrcStandartCtcpHandler::handleCtcpRequest(IrcAccount *account, const QString &sender, const QString &senderHost,
											   const QString &receiver, const QString &cmd, const QString &params)
{
	Q_UNUSED(account);
	Q_UNUSED(senderHost);
	Q_UNUSED(receiver);
	if (cmd == "PING") {
		account->sendCtcpReply(sender, "PING", params);
	} else if (cmd == "ACTION") {
		m_conn->handleTextMessage(sender, senderHost, receiver, QLatin1String("/me ") + params);
	} else if (cmd == "CLIENTINFO") {
		QString params = QString("IRC plugin for qutIM %1 - http://qutim.org - Supported tags: %2")
						 .arg(versionString())
						 .arg(m_conn->supportedCtcpTags().join(","));
		account->sendCtcpReply(sender, "CLIENTINFO", params);
	} else if (cmd == "VERSION") {
		QString params = QString("IRC plugin %1, qutim %2 running on %3")
						 .arg(qutimIrcVersionStr())
						 .arg(versionString())
						 .arg(SystemInfo::getFullName());
		account->sendCtcpReply(sender, "VERSION", params);
	} else if (cmd == "TIME") {
		account->sendCtcpReply(sender, "TIME", QDateTime::currentDateTime().toString("ddd MMM dd hh:mm:ss yyyy"));
	}
}
Exemplo n.º 6
0
BOOL AboutDialog::onInitDialog()
{

  Control versionLabel;

  versionLabel.setWindow(GetDlgItem(m_ctrlThis.getWindow(), IDC_STATIC_VERSION));

  StringStorage binaryPath;
  StringStorage versionText;
  StringStorage versionString(_T("unknown"));

  Environment::getCurrentModulePath(&binaryPath);

  try {
    VersionInfo productInfo(binaryPath.getString());
    versionString.setString(productInfo.getProductVersionString());
  } catch (SystemException &ex) {
    MessageBox(m_ctrlThis.getWindow(),
      ex.getMessage(),
      StringTable::getString(IDS_MBC_TVNCONTROL),
      MB_OK | MB_ICONEXCLAMATION);
  }

  versionText.format(StringTable::getString(IDS_PRODUCT_VERSION_FORMAT),
    versionString.getString(),
    BuildTime::DATE);

  versionLabel.setText(versionText.getString());

  return FALSE;
}
Exemplo n.º 7
0
	bool initialize()
	{
		GPU::HiddenWindow::initialize();

		Format testFmnt;
		testFmnt.versionMajor = 2;
		testFmnt.versionMinor = 1;
		testFmnt.versionProfile = Profile::COMPATIBILITY;

		Context* testCtxt = new Context(testFmnt);

		testCtxt->makeCurrent();
		vendorString = std::string((char*)glGetString(GL_VENDOR));
		rendererString = std::string((char*)glGetString(GL_RENDERER));
		std::string versionString((char*)glGetString(GL_VERSION));
		std::string glslVersionString((char*)glGetString(GL_SHADING_LANGUAGE_VERSION));
		testCtxt->doneCurrent();

		delete testCtxt;

		std::stringstream strStream(versionString);
		std::string token;

		std::getline(strStream, token, '.');
		maxGLVersionMajor = atoi(token.c_str());
		std::getline(strStream, token, '.');
		maxGLVersionMinor = atoi(token.c_str());

		return true;
	}
Exemplo n.º 8
0
void MapWidget::initializeGL()
{
    initializeOpenGLFunctions();

    QString versionString(QLatin1String(reinterpret_cast<const char*>(glGetString(GL_VERSION))));

    QOpenGLContext *ctx = QOpenGLContext::currentContext();
    Q_UNUSED(ctx);
    lg = new QOpenGLDebugLogger(context());
    lg->initialize();
    lg->startLogging(QOpenGLDebugLogger::SynchronousLogging);
    lg->enableMessages();
    connect(lg, SIGNAL(messageLogged(QOpenGLDebugMessage)), this, SLOT(glLog(QOpenGLDebugMessage)));

    qDebug() << "Driver Version String:" << versionString;
    qDebug() << "Current Context:" << ctx->format();

    //glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &gpuTotalMemory);
    //qDebug() << "total" << gpuTotalMemory;

    m_renderer = new Renderer();
    m_renderer->createStaticResources();

    //m_painterOverlay = new PainterOverlay();
}
Exemplo n.º 9
0
    void Options::tryParseOptions(int argc, char **argv)
    {
        try {
            parseOptions(argc, argv);

            // TODO: not sure is it normal to check this here.
            if (m_variablesMap.count("help")) {
                std::cout << (*this);
                exit(EXIT_SUCCESS);
            }

            if (m_variablesMap.count("version")) {
                std::cout << versionString(true) << std::endl;
                exit(EXIT_SUCCESS);
            }

            /**
             * Install log level here for now,
             * maybe we need to move this to childs
             */
            Util::installLoggerLevel(getValue<int>("logLevel"));

            std::string fileFormat = getValue<std::string>("logFile");
            if (fileFormat.size()) {
                Util::installLoggerFile(fileFormat);
            }
        } catch(const std::exception &exception) {
            if (PRINT_HELP_ON_ERROR) {
                std::cerr << (*this);
            }

            std::cerr << exception.what() << std::endl;
            abort();
        }
    }
Exemplo n.º 10
0
//--------------------------------------------------------------------------------------------------
/// Get an OpenGL version string for the OpenGL context that is current at the moment
//--------------------------------------------------------------------------------------------------
QString AboutDialog::versionStringForcurrentOpenGLContext()
{
    QString versionString("OpenGL ");

    QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();

    if      (flags & QGLFormat::OpenGL_Version_4_0              ) versionString += "4.0";
    else if (flags & QGLFormat::OpenGL_Version_3_3              ) versionString += "3.3";
    else if (flags & QGLFormat::OpenGL_Version_3_2              ) versionString += "3.2";
    else if (flags & QGLFormat::OpenGL_Version_3_1              ) versionString += "3.1";
    else if (flags & QGLFormat::OpenGL_Version_3_0              ) versionString += "3.0";
    else if (flags & QGLFormat::OpenGL_ES_Version_2_0           ) versionString += "ES_Version 2.0";
    else if (flags & QGLFormat::OpenGL_ES_CommonLite_Version_1_1) versionString += "ES_CommonLite_Version 1.1";
    else if (flags & QGLFormat::OpenGL_ES_Common_Version_1_1    ) versionString += "ES_Common_Version 1.1";
    else if (flags & QGLFormat::OpenGL_ES_CommonLite_Version_1_0) versionString += "ES_CommonLite_Version 1.0";
    else if (flags & QGLFormat::OpenGL_ES_Common_Version_1_0    ) versionString += "ES_Common_Version 1.0";
    else if (flags & QGLFormat::OpenGL_Version_2_1              ) versionString += "2.1";
    else if (flags & QGLFormat::OpenGL_Version_2_0              ) versionString += "2.0";
    else if (flags & QGLFormat::OpenGL_Version_1_5              ) versionString += "1.5";
    else if (flags & QGLFormat::OpenGL_Version_1_4              ) versionString += "1.4";
    else if (flags & QGLFormat::OpenGL_Version_1_3              ) versionString += "1.3";
    else if (flags & QGLFormat::OpenGL_Version_1_2              ) versionString += "1.2";
    else if (flags & QGLFormat::OpenGL_Version_1_1              ) versionString += "1.1";
    else if (flags & QGLFormat::OpenGL_Version_None             ) versionString += "None";
    else versionString += "Unknown";

    return versionString;
}
Exemplo n.º 11
0
BOOL AboutDialog::onInitDialog()
{
  // Update product version string.
  StringStorage versionString(_T("unknown"));
  try {
    StringStorage binaryPath;
    Environment::getCurrentModulePath(&binaryPath);
    VersionInfo productInfo(binaryPath.getString());
    versionString.setString(productInfo.getProductVersionString());
  } catch (SystemException &ex) {
    MessageBox(m_ctrlThis.getWindow(),
               ex.getMessage(),
               StringTable::getString(IDS_MBC_TVNVIEWER),
               MB_OK | MB_ICONEXCLAMATION);
  }

  // Format product version and build time for displaying on the dialog.
  StringStorage versionText;
  versionText.format(StringTable::getString(IDS_PRODUCT_VERSION_FORMAT),
                     versionString.getString(),
                     BuildTime::DATE);

  // Show version info on the dialog.
  Control versionLabel;
  versionLabel.setWindow(GetDlgItem(m_ctrlThis.getWindow(), IDC_STATIC_VERSION));
  versionLabel.setText(versionText.getString());

  // Show licensing info and/or special build info.
  Control licensingLabel;
  licensingLabel.setWindow(GetDlgItem(m_ctrlThis.getWindow(), IDC_STATIC_LICENSING));
  licensingLabel.setText(StringTable::getString(IDS_LICENSING_INFO));

  return FALSE;
}
Exemplo n.º 12
0
AgrosApplication::AgrosApplication(int& argc, char ** argv) : QApplication(argc, argv), m_scriptEngineRemote(NULL)
{
    setWindowIcon(icon("agros2d"));
    setApplicationVersion(versionString());
    setOrganizationName("hpfem.org");
    setOrganizationDomain("hpfem.org");
    setApplicationName("Agros2D-3");

#ifdef Q_WS_MAC
    // don't show icons in menu
    setAttribute(Qt::AA_DontShowIconsInMenus, true);
#endif

    // std::string codec
#if QT_VERSION < 0x050000
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
#endif
    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));

    // force number format
    QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));

    // init singleton
    Agros2D::createSingleton();
}
Exemplo n.º 13
0
void UpdateInfo::writeElement( QXmlStreamWriter &xml )
{
  xml.writeStartElement( QLatin1String("owncloudclient") );
  if ( !version().isEmpty() ) {
    xml.writeTextElement(  QLatin1String("version"), version() );
  }
  if ( !versionString().isEmpty() ) {
    xml.writeTextElement(  QLatin1String("versionstring"), versionString() );
  }
  if ( !web().isEmpty() ) {
    xml.writeTextElement(  QLatin1String("web"), web() );
  }
  if ( !downloadUrl().isEmpty() ) {
    xml.writeTextElement(  QLatin1String("downloadurl"), web() );
  }
  xml.writeEndElement();
}
Exemplo n.º 14
0
ReadabilityHttpRequest* QtReadabilityParserApi::getConfidenceRequest(QUrl articleUrl)
{
    QUrlQuery urlQuery;
    urlQuery.addQueryItem("url", QUrl::toPercentEncoding(articleUrl.toString()));
    urlQuery.addQueryItem("token", m_token);
    QString path = QString("/%1/confidence").arg(versionString());
    QUrl url(QtReadabilityParserApi::BaseUrl + path);
    url.setQuery(urlQuery);
    return new ReadabilityHttpRequest(url);
}
Exemplo n.º 15
0
static void printVersion()
{
	QTextStream str(stdout);
	str << qApp->applicationName() << " version " << versionString() << endl
		<< "Using Qt version " << qVersion() << endl
		<< "GPL v3 or any later" << endl;
//	foreach (Plugin *plugin, p->plugins) {
//		PluginInfo info = plugin->info();
//		str << "  " << info.name() << ' ' << formatVersion(info.version())
//			<< ' ' << info.description() <<  '\n';
//	}
}
Exemplo n.º 16
0
B_USE_NAMESPACE

int main(int argc, char **argv) {
  QApplication app(argc, argv);
  QApplication::setApplicationName("possamp");
  QApplication::setApplicationVersion(versionString());

  // Start in event loop.
  MainWindow main;
  QTimer::singleShot(0, &main, SLOT(show()));

  return app.exec();
}
Exemplo n.º 17
0
int main(int argc, char **argv) {
  QApplication app(argc, argv);
  QCoreApplication::setApplicationName("sld");
  QCoreApplication::setApplicationVersion(versionString());

  QString file;
  if (argc > 1) {
    file = QString::fromUtf8(argv[1]);
  }

  // Start in event loop.
  MainWindow main(file);
  QTimer::singleShot(0, &main, SLOT(show()));

  return app.exec();
}
Exemplo n.º 18
0
int main(int argc, char **argv) {
  QCoreApplication app(argc, argv);

  // Register signals for cleanup.
  signal(SIGABRT, &signalHandler);
	signal(SIGTERM, &signalHandler);
	signal(SIGINT, &signalHandler);

#ifndef WIN
  // SIGKILL is not available on Windows.
	signal(SIGKILL, &signalHandler);
#endif  

  qDebug() << "Starting backup server -" << qPrintable(versionString());
  server = new Server;
  
  return app.exec();
}
Exemplo n.º 19
0
cuda::FatBinaryContext::FatBinaryContext(const void *ptr): cubin_ptr(ptr) {

	report("FatBinaryContext(" << ptr << ")");

	_name = 0;
	_ptx = 0;
	_cubin = 0;

	if(*(int*)cubin_ptr == __cudaFatMAGIC) {
		__cudaFatCudaBinary *binary = (__cudaFatCudaBinary *)cubin_ptr;

		_name = binary->ident;

		//assertM(binary->ptx != 0, "binary contains no PTX");
		//assertM(binary->ptx->ptx != 0, "binary contains no PTX");

		unsigned int ptxVersion = 0;
		unsigned int cubinVersion = 0;

		if (binary->ptx) {
			report("Getting the highest PTX version");

			for(unsigned int i = 0; ; ++i)
			{
				if((binary->ptx[i].ptx) == 0) break;
		
				std::string computeCapability = binary->ptx[i].gpuProfileName;
				std::string versionString(computeCapability.begin() + 8,
					computeCapability.end());
		
				std::stringstream version;
				unsigned int thisVersion = 0;
			
				version << versionString;
				version >> thisVersion;
				if(thisVersion > ptxVersion)
				{
					ptxVersion = thisVersion;
					_ptx = binary->ptx[i].ptx;
				}
			}		
			report(" Selected version " << ptxVersion);
		}
Exemplo n.º 20
0
std::vector<DebugInfo::InfoGroup> DebugInfo::generalInfo()
{
	InfoGroup generalGroup;

	InfoUnit generalInfo;
	InfoUnit memoryInfo;
	InfoUnit textureInfo;

	generalGroup.name = "General";

	generalInfo.name = "OpenGL";
	memoryInfo.name = "Memory";
	textureInfo.name = "General Texture Info";

    generalInfo.addProperty("version", versionString());
    generalInfo.addProperty("vendor", vendor());
    generalInfo.addProperty("renderer", renderer());
    generalInfo.addProperty("core profile", isCoreProfile()?"true":"false");
    generalInfo.addProperty("GLSL version", getString(gl::GL_SHADING_LANGUAGE_VERSION));

	memoryInfo.addProperty("total", humanReadableSize(1024ll*memory::total()));
	memoryInfo.addProperty("dedicated", humanReadableSize(1024ll*memory::dedicated()));
	memoryInfo.addProperty("available", humanReadableSize(1024ll*memory::available()));
	memoryInfo.addProperty("evicted", humanReadableSize(1024ll*memory::evicted()));
	memoryInfo.addProperty("evictionCount", memory::evictionCount());

    int maxTextureSize = getInteger(gl::GL_MAX_TEXTURE_SIZE);
	textureInfo.addProperty("Max Texture Size", std::to_string(maxTextureSize)+" x "+std::to_string(maxTextureSize));
    textureInfo.addProperty("Max Vertex Texture Image Units", getInteger(gl::GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS));
    textureInfo.addProperty("Max Texture Image Units", getInteger(gl::GL_MAX_IMAGE_UNITS));
    textureInfo.addProperty("Max Geometry Texture Units", getInteger(gl::GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS));
    auto maxViewportSize = getIntegers<2>(gl::GL_MAX_VIEWPORT_DIMS);
	textureInfo.addProperty("Max viewport size", std::to_string(maxViewportSize[0])+" x "+std::to_string(maxViewportSize[1]));
    textureInfo.addProperty("Max clip distances", getInteger(gl::GL_MAX_CLIP_DISTANCES));
    textureInfo.addProperty("Max Samples", getInteger(gl::GL_MAX_SAMPLES));

	generalGroup.addInfoUnit(generalInfo);
	generalGroup.addInfoUnit(memoryInfo);
	generalGroup.addInfoUnit(textureInfo);

	return std::vector<InfoGroup>({ generalGroup });
}
Exemplo n.º 21
0
QString StatisticsHelper::infoHtml() const
{
	QRect size = qApp->desktop()->screenGeometry();
	return tr("<b>Short:</b> %1 <br />"
	          "<b>Version:</b> %2 <br />"
	          "<b>Full:</b> %3 <br />"
	          "<b>qutIM Version:</b> %4 <br />"
	          "<b>Qt Version:</b> %5 (%6 bit) <br />"
	          "<b>Screen resolution:</b> %7 x %8 <br />"
	          "<b>System locale:</b> %9<br />"
	          ).arg(SystemInfo::getName())
	        .arg(SystemInfo::getVersion())
	        .arg(SystemInfo::getFullName())
	        .arg(QLatin1String(versionString()))
	        .arg(QLatin1String(qVersion()))
	        .arg(QString::number(QSysInfo::WordSize))
	        .arg(size.width())
	        .arg(size.height())
	        .arg(QLocale::system().name());
}
Exemplo n.º 22
0
void StatisticsHelperPrivate::init()
{
	QRect size = qApp->desktop()->screenGeometry();
	systemInfo.insert(QLatin1String("os"), SystemInfo::getVersion());
	systemInfo.insert(QLatin1String("short"), SystemInfo::getName());
	systemInfo.insert(QLatin1String("full"), SystemInfo::getFullName());
	systemInfo.insert(QLatin1String("version"), versionString());
	systemInfo.insert(QLatin1String("qt"), QLatin1String(qVersion()));
	systemInfo.insert(QLatin1String("wordSize"), QString::number(QSysInfo::WordSize));
	systemInfo.insert(QLatin1String("width"), QString::number(size.width()));
	systemInfo.insert(QLatin1String("height"), QString::number(size.height()));
	systemInfo.insert(QLatin1String("locale"), QLocale::system().name());
	
	Config config = Profile::instance()->config();
	config.beginGroup(QLatin1String("statistics"));
	bool denied = config.value(QLatin1String("denied"), false);
	bool automatic = config.value(QLatin1String("automatic"), false);
	if (denied && automatic) {
		action = StatisticsHelper::DeniedToSend;
		return;
	}
	QString key = config.value(QLatin1String("key"), QString());
	if (key.isEmpty()) {
		action = StatisticsHelper::NeedToAskInit;
		return;
	}
	for (QVariantMap::ConstIterator it = systemInfo.constBegin();
	     it != systemInfo.constEnd(); ++it) {
		if (config.value(it.key(), QString()) != it.value().toString()) {
			if (automatic) {
				sendInfo();
				action = StatisticsHelper::NothingToAsk;
				return;
			}
			action = StatisticsHelper::NeedToAskUpdate;
			return;
		}
	}
	action = StatisticsHelper::NothingToAsk;
}
Exemplo n.º 23
0
PythonLabApplication::PythonLabApplication(int& argc, char ** argv) : QtSingleApplication(argc, argv)
{
    setWindowIcon(icon("pythonlab"));
    setApplicationVersion(versionString());
    setOrganizationName("hpfem.org");
    setOrganizationDomain("hpfem.org");
    setApplicationName("PythonLab");

#ifdef Q_WS_MAC
    // don't show icons in menu
    setAttribute(Qt::AA_DontShowIconsInMenus, true);
#endif

    // std::string codec
#if QT_VERSION < 0x050000
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
#endif
    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));

    // force number format
    QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
}
Exemplo n.º 24
0
SubsurfaceAbout::SubsurfaceAbout(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
{
	ui.setupUi(this);

	setWindowModality(Qt::ApplicationModal);
	QString versionString(subsurface_git_version());
	QStringList readableVersions = QStringList() << "4.5.95" << "4.6 Beta 0" <<
							"4.5.96" << "4.6 Beta 1" <<
							"4.5.97" << "4.6 Beta 2";
	if (readableVersions.contains(versionString))
		versionString = readableVersions[readableVersions.indexOf(versionString) + 1];

	ui.aboutLabel->setText(tr("<span style='font-size: 18pt; font-weight: bold;'>"
				  "Subsurface %1 </span><br><br>"
				  "Multi-platform divelog software<br>"
				  "<span style='font-size: 8pt'>"
				  "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, and others, 2011-2017"
				  "</span>").arg(versionString));

	QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
	connect(close, SIGNAL(activated()), this, SLOT(close()));
	QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
	connect(quit, SIGNAL(activated()), parent, SLOT(close()));
}
Exemplo n.º 25
0
extern "C" jstring Java_libcore_icu_ICU_getUnicodeVersion(JNIEnv* env, jclass) {
    UVersionInfo unicodeVersion;
    u_getUnicodeVersion(unicodeVersion);
    return versionString(env, unicodeVersion);
}
Exemplo n.º 26
0
primitiveVersionString(void)
{
	popthenPush(1, stringFromCString(versionString()));
	return 0;
}
Exemplo n.º 27
0
static jstring ICU_getUnicodeVersion(JNIEnv* env, jclass) {
    UVersionInfo unicodeVersion;
    u_getUnicodeVersion(unicodeVersion);
    return versionString(env, unicodeVersion);
}
Exemplo n.º 28
0
static jstring ICU_getIcuVersion(JNIEnv* env, jclass) {
    UVersionInfo icuVersion;
    u_getVersion(icuVersion);
    return versionString(env, icuVersion);
}
Exemplo n.º 29
0
static jstring ICU_getCldrVersion(JNIEnv* env, jclass) {
  UErrorCode status = U_ZERO_ERROR;
  UVersionInfo cldrVersion;
  ulocdata_getCLDRVersion(cldrVersion, &status);
  return versionString(env, cldrVersion);
}
Exemplo n.º 30
0
extern "C" jstring Java_libcore_icu_ICU_getIcuVersion(JNIEnv* env, jclass) {
    UVersionInfo icuVersion;
    u_getVersion(icuVersion);
    return versionString(env, icuVersion);
}