lg2_common

class lg2_common

This is a class to work with git.

Whenever the user is done with the project he can push back to the github repository he cloned from. The code in project.h, project.cpp and this class form the libgit module.

The function of the module is to ensure that the project(OCR Text files) gets pushed to github.

Public Functions

void PostError(QString errorMessage)

This function is used to fetch error message from the Git Client and show it as a message box to the user in our tool.

Parameters:

QString – errorMessage

int check_lg2(int error, std::string message, std::string extra)

This function is used to check any errors from our Git Client and return the error.

If there is no error then it returns 0 (i.e. returns false) If there is a git error then it fetches the error-message from libgit and formats it for showing it in the QMessageBox. It then calls PostError() which facilitates showing the message on MessageBox on our tool

Parameters:
  • error

  • message

  • extra

Returns:

Class of error