Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

:M, Fix bugs...

  • Loading branch information...
commit befebcb9dfefa1c0c84152263874aa5bf18a57d0 1 parent e05bfa5
@nycholas authored
View
2  src/core/contenttypes.cpp
@@ -270,6 +270,8 @@ void ContentTypes::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void ContentTypes::timerStatus(void) {
View
2  src/core/group.cpp
@@ -260,6 +260,8 @@ void Group::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void Group::timerStatus(void) {
View
2  src/core/permission.cpp
@@ -268,6 +268,8 @@ void Permission::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void Permission::timerStatus(void) {
View
2  src/core/user.cpp
@@ -294,6 +294,8 @@ void User::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void User::timerStatus(void) {
View
2  src/core/xxx.cpp
@@ -302,6 +302,8 @@ void Xxx::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void Xxx::timerStatus(void) {
View
2  src/modules/admin/act.cpp
@@ -302,6 +302,8 @@ void Act::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void Act::timerStatus(void) {
View
2  src/modules/admin/coupon.cpp
@@ -301,6 +301,8 @@ void Coupon::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void Coupon::timerStatus(void) {
View
8 src/modules/admin/models/couponmodel.cpp
@@ -147,8 +147,10 @@ bool CouponModel::insert(void) {
query.bindValue(":description", _description);
query.bindValue(":date_joined", _dateJoined.toString("yyyy-MM-dd hh:mm:ss"));
query.bindValue(":is_active", _isActive);
- int st = query.exec();
- _id = st;
+ bool st = query.exec();
+ if (st) {
+ _id = query.lastInsertId().toInt();
+ }
return st;
}
@@ -163,7 +165,7 @@ bool CouponModel::update(void) {
query.bindValue(":description", _description);
query.bindValue(":date_changed", _dateChanged);
query.bindValue(":is_active", _isActive);
- int st = query.exec();
+ bool st = query.exec();
return st;
}
View
2  src/modules/admin/register.cpp
@@ -302,6 +302,8 @@ void Register::updateModels(void) {
nextPushButton->setEnabled(begin > 0);
previousPushButton->setEnabled(sizeAll > (size + begin));
oldestPushButton->setEnabled(sizeAll > (size + begin));
+
+ updateWidgets();
}
void Register::timerStatus(void) {
Please sign in to comment.
Something went wrong with that request. Please try again.