Browse Source

[logtime] Improved failure message

Dmitry Yu Okunev 8 years ago
parent
commit
ce8da05f7b
3 changed files with 10 additions and 1 deletions
  1. 4 1
      logtimewindow.cpp
  2. 5 0
      redmineclass_time_entry.cpp
  3. 1 0
      redmineclass_time_entry.h

+ 4 - 1
logtimewindow.cpp

@@ -59,8 +59,11 @@ void LogTimeWindow::on_saveFailure ( QNetworkReply *reply )
 
 	qDebug ( "LogTimeWindow::on_saveFailure()" );
 
+	QString techInfo = QString("issueId == %1; projectId == %2").arg(this->timeEntry.getIssueId()).arg(this->timeEntry.getProjectId());
 	QMessageBox messageBox;
-	messageBox.critical(0, "Error", "Внутренняя ошибка. Рекомендуем связаться с технической поддержкой по адресу <tasks@mephi.ru>.");
+	messageBox.critical(0, "Error", "Внутренняя ошибка. Рекомендуем связаться с технической поддержкой по адресу <tasks@mephi.ru>. Техническая информация: "+techInfo);
+
+	return;
 }
 
 void LogTimeWindow::get_time_entries_callback ( QNetworkReply *reply, QJsonDocument *json, void *arg )

+ 5 - 0
redmineclass_time_entry.cpp

@@ -49,6 +49,11 @@ int RedmineClass_TimeEntry::setProjectId ( int projectId )
 	return 0;
 }
 
+int RedmineClass_TimeEntry::getProjectId()
+{
+	return this->projectId;
+}
+
 int RedmineClass_TimeEntry::setIssueId ( int issueId )
 {
 	this->issueId = issueId;

+ 1 - 0
redmineclass_time_entry.h

@@ -38,6 +38,7 @@ public:
 	int setIssueId ( int issueId );
 	int getIssueId();
 	int setProjectId ( int projectId );
+	int getProjectId();
 	int setRedmine ( Redmine *redmine );
 	void saveCallback(QNetworkReply *reply, QJsonDocument *timeEntry_doc, void *_null );