make compatible with Qt5 and unified versions in WOC
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 3 Dec 2011 20:51:27 +0000 (20:51 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 3 Dec 2011 20:51:27 +0000 (20:51 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@755 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/dialogs/configdialog.cpp
src/dialogs/orderwin.h
src/iface/msinterface.cpp
src/iface/msinterface.h
src/main.cpp
src/smoke.pro

index 2b54711..a68968b 100644 (file)
@@ -573,7 +573,7 @@ void MConfigDialog::sslErrors(QNetworkReply*rp,const QList<QSslError>&errs)
        for(int i=0;i<errs.size();i++){
                QSslCertificate c=errs[i].certificate();
                err+=tr("Certificate \"%1\"\n  Fingerprint (sha1): %2\n  Error: %3\n")
-                       .arg(c.subjectInfo(QSslCertificate::CommonName))
+                       .arg(c.subjectInfo(QSslCertificate::CommonName).at(0))
                        .arg(QString::fromAscii(c.digest(QCryptographicHash::Sha1).toHex()))
                        .arg(errs[i].errorString());
        }
index f938251..402a795 100644 (file)
@@ -24,6 +24,7 @@ class QAction;
 class QLabel;
 class QTableView;
 class QStandardItemModel;
+class QPrinter;
 
 /**displays an order and allows the user to execute several commands on it*/
 class MOrderWindow:public QMainWindow
index 5fb7b8a..08948c9 100644 (file)
@@ -154,13 +154,6 @@ QString MSInterface::configSettingsGroup()const
        return "profiles/"+profileid;
 }
 
-QString MSInterface::repoPart()
-{
-       QStringList l=svnRepositoryUrl().split("/smoke/");
-       if(l.size()>1)return l[1];
-       else return svnRepositoryUrl();
-}
-
 bool MSInterface::hasRight(Right r)const
 {
        if(userroles.contains("_admin"))return true;
index 8b499e3..bb54c22 100644 (file)
@@ -30,7 +30,6 @@ class MSInterface:public MInterface
        Q_PROPERTY(QString dataDir READ dataDir)
        Q_PROPERTY(QString settingsGroup READ settingsGroup)
        Q_PROPERTY(QString sessionId READ sessionId)
-       Q_PROPERTY(QString repoPart READ repoPart)
        Q_PROPERTY(QString profileId READ profileId)
        public:
                /**creates the interface object, expects the profile ID as parameter*/
@@ -69,9 +68,6 @@ class MSInterface:public MInterface
                /**returns the current session ID*/
                Q_INVOKABLE QString sessionId()const{return m_sessid;}
                
-               /**returns the branch/trunk part of the repository*/
-               Q_INVOKABLE static QString repoPart();
-               
                /**returns default headers, ie. session ID*/
                virtual QMap<QString,QString> headers(QString)const;
                
index d709f30..1c9976d 100644 (file)
@@ -91,9 +91,9 @@ void MApplication::aboutMS()
                        "protected under the GNU GPL v.3 or at your option any newer<p>"
                        "See also the <a href=\"%4\">MagicSmoke Homepage</a>.<p>"
                        "This version was compiled from repository '%1' revision '%2'.")
-                       .arg(MSInterface::repoPart()) // %1
-                       .arg(MInterface::svnVersion()) //%2
-                       .arg(MSInterface::version()) //%3
+                       .arg(MSInterface::staticVersionInfo(WOb::VersionRootURL)) // %1
+                       .arg(MInterface::staticVersionInfo(WOb::VersionNumber)) //%2
+                       .arg(MSInterface::staticVersionInfo(WOb::VersionHR)) //%3
                        .arg(HOMEPAGE_BASEURL) //%4
                );
        mb.setStandardButtons(QMessageBox::Ok);
@@ -145,8 +145,9 @@ QMenu* MApplication::helpMenu()
 void MApplication::help()
 {
        QString d=QApplication::applicationDirPath()+"/doc/index.html";
+       //TODO: fix this to work with GIT and be more generic
        if(!QFile(d).exists()){
-               d=HOMEPAGE_BASEURL "/doc/"+MSInterface::repoPart()+"/index.html";
+               d=HOMEPAGE_BASEURL "/doc/"+MSInterface::staticVersionInfo(WOb::VersionPath)+"/index.html";
        }else d="file:///"+d;
        QDesktopServices::openUrl(QUrl(d));
 }
index d99e3b2..631d1c1 100644 (file)
@@ -10,6 +10,9 @@ CONFIG += debug
 
 CONFIG += qt thread link_prl
 QT += xml network script scripttools
+contains(QT_MAJOR_VERSION,"5") {
+ QT += widgets printsupport
+}
 
 win32-* {
  #RC-File containing the icon: