Browse Source

change tool/map_lanetoxodr. fix conflict.

yuchuli 3 years ago
parent
commit
6809b84ee8

+ 0 - 71
src/tool/map_lanetoxodr/adclicenseserv.cpp

@@ -1,71 +0,0 @@
-#include "adclicenseserv.h"
-
-#include <QProcess>
-#include "modulecomm.h"
-#include <thread>
-#include <iostream>
-
-namespace iv {
-struct ivlicensekey
-{
-    bool linshikey;
-    bool yongjiukey;
-};
-}
-
-
-iv::ivlicensekey gkey;
-void * gpa;
-bool gbHaveRecvKey = false;
-
-
-
-ADCLicenseServ::ADCLicenseServ()
-{
-
-}
-
-void ListenKey(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
-{
-
-    std::cout<<"key len is "<<nSize<<std::endl;
-    if(nSize >= sizeof (iv::ivlicensekey))
-    {
-        memcpy(&gkey,strdata,sizeof(iv::ivlicensekey));
-        std::cout<<" key 1:"<<gkey.linshikey<<"key 2:"<<gkey.yongjiukey<<std::endl;
-        gbHaveRecvKey = true;
-    }
-
-}
-
-
-int ADCLicenseServ::CheckLincese()
-{
-    gpa = iv::modulecomm::RegisterRecv("keyfeedback",ListenKey);
-    std::this_thread::sleep_for(std::chrono::milliseconds(100));
-    QProcess * pProc = new QProcess();
-//    pProc->start("adc_key_win_exe.exe");
-    QTime xTime;
-    xTime.start();
-    while(gbHaveRecvKey == false)
-    {
-        std::this_thread::sleep_for(std::chrono::milliseconds(1));
-        if(xTime.elapsed()>10000)
-        {
-            break;
-        }
-    }
-    if(gbHaveRecvKey)
-    {
-        if((gkey.yongjiukey == true)||(gkey.linshikey == true))
-        {
-            return  0;
-        }
-        else
-        {
-            return  -1;
-        }
-    }
-    return -2;
-
-}

+ 0 - 14
src/tool/map_lanetoxodr/adclicenseserv.h

@@ -1,14 +0,0 @@
-#ifndef ADCLICENSESERV_H
-#define ADCLICENSESERV_H
-
-
-class ADCLicenseServ
-{
-public:
-    ADCLicenseServ();
-
-public:
-    static int CheckLincese();
-};
-
-#endif // ADCLICENSESERV_H

+ 0 - 33
src/tool/map_lanetoxodr/main.cpp

@@ -12,14 +12,8 @@
 #endif
 
 #include <QApplication>
-#include <QMessageBox>
 
-<<<<<<< .mine
-#include "adclicenseserv.h"
-=======
 #include "adclicensewithwin.h"
->>>>>>> .theirs
-
 
 #ifdef ANDROID
 #include <QAndroidJniEnvironment>
@@ -82,37 +76,10 @@ int main(int argc, char *argv[])
 #ifdef XODRViewer
     XVMainWindow w;
 #else
-<<<<<<< .mine
-    int nRtn = ADCLicenseServ::CheckLincese();
-    if(nRtn == -1)
-    {
-        QMessageBox::warning(NULL,"Warning","License 错误,请申请Lincense",QMessageBox::YesAll);
-        return 0;
-    }
-    else
-    {
-        if(nRtn == -2)
-        {
-            QMessageBox::warning(NULL,"Warning","License服务启动失败",QMessageBox::YesAll);
-            return 0;
-        }
-    }
-=======
     if(ADCLicenseCheckWithWin() != 0)
     {
 //        return 0;
     }
-
-
-
-
-
-
-
-
-
-
->>>>>>> .theirs
     MainWindow w;
 #endif
     w.show();

+ 0 - 2
src/tool/map_lanetoxodr/map_lanetoxodr.pro

@@ -28,7 +28,6 @@ QMAKE_LFLAGS += -no-pie
 
 
 SOURCES += \
-    adclicenseserv.cpp \
     autoconnect.cpp \
     autoroadcontact.cpp \
     dialogaddroadfromrtk.cpp \
@@ -77,7 +76,6 @@ SOURCES += \
     xodrscenfunc.cpp
 
 HEADERS += \
-    adclicenseserv.h \
     autoconnect.h \
     autoroadcontact.h \
     dialogaddroadfromrtk.h \